latex3 / latex2e

The LaTeX2e kernel
https://www.latex-project.org/
LaTeX Project Public License v1.3c
1.88k stars 261 forks source link

newcm as fallback or default? #485

Open kberry opened 3 years ago

kberry commented 3 years ago

I'd like to suggest that LaTeX under XeTeX/LuaTeX take advantage of Antonis Tsolomitis's newcm OpenType fonts. https://ctan.org/pkg/newcomputermodern

Antonis (atsol at aegean dot gr) says that newcm is a proper superset of Latin Modern, adding coverage for Greek, Cyrillic, and more. Therefore documents using Greek or Cyrillic would "just work" (under Unicode engines) if newcm could be used. Furthermore, newcm is metric-compatible with Latin Modern.

So I could imagine simply using newcm by default; on the other hand, it does lack individual font files for all the usual CM point sizes, compared to lm. (Antonis is working on making companion 8pt fonts, but newcm fonts for every CM size are unlikely to be available any time soon.)

Thus, a more general solution might be for LaTeX to support some sort of fallback mechanism per Unicode block/language/whatever, as many other programs do. Then it would be possible to also make other scripts work by default, without requiring that a single font cover all of Unicode. Maybe such a mechanism already exists, and I just don't know about it?

On the math front: newcm has complete coverage of all Unicode math, per Antonis's latest announcement: https://ctan.org/ctan-ann/id/mailman.3089.1611042712.2532.ctan-ann@ctan.org

Therefore it seems it would be useful for it to be the new default for Unicode math (aka unicode-math) in LaTeX? Antonis and I have mentioned the idea to Will, but I think he is (understandably) far too busy with the new family member to think about such things.

Since LM math also comes in only one point size (I think?), the single point size for newcm doesn't seem like a barrier there.

I suppose the ideas here imply significant amounts of work, probably more than one github issue should hold. It can always be split up later. I just thought it would be useful to present them together.

Thanks for considering,

FrankMittelbach commented 3 years ago

I followed that development in passing, but as far as I can see it is still very much under development with regular updates and changes. As long as that is the case I think considering it for a default fontset is premature reguardless of font quality on which I haven't see reviews in one or the other direction. So while I think this is an interesting and helpful contributions I think it is too earlier to consider it in one or the other way.

u-fischer commented 3 years ago

with lualatex you can define fallback fonts. But imho due to the missing optical sizes the combination lm/newcm looks unbalanced at small and large size:

\documentclass{article}

\directlua{luaotfload.add_fallback
   ("newcmfallback",
    {
      "file:NewCM10-Book.otf:mode=node;"
    }
   )}

\begin{document}
\font\test={file:lmroman5-regular.otf:mode=node;fallback=newcmfallback;}
\test
abc Γειά σου Κόσμε 

\font\test={file:lmroman10-regular.otf:mode=node;fallback=newcmfallback;}
\test

abc Γειά σου Κόσμε

\font\test={file:lmroman17-regular.otf:mode=node;fallback=newcmfallback;}
\test

abc Γειά σου Κόσμε

\end{document}

image

FrankMittelbach commented 3 years ago

my point is that a support/maintenance dependency to something that is still under very active development and outside our control is not advisable for the kernel (and your example shows that this is not that good as general fallback fonts yet either). It would only result in support requests on our door that that we would then have to field without being able to resolve them. So it should be imho at this point be package level.