latex3 / fontspec

Font selection in LaTeX for XeTeX and LuaTeX
http://latex3.github.io/fontspec/
LaTeX Project Public License v1.3c
277 stars 34 forks source link

reference list for .fontspec files? #406

Open kberry opened 4 years ago

kberry commented 4 years ago

Is there a reference list of all the different variants that can be listed in a .fontspec file? I see the list on page 14 of the doc, "More control over font shape selection".

The main thing I'm missing from there is sans -- can that be specified? And what about math? (I don't need math at present, but I wonder.)

I started looking into this for the sake of the new cm-unicode collection (ctan.org/pkg/cm-unicode) which, naturally, has all the variants CM does. Joseph wanted to use it in his latest TUGboat article ... --thanks, karl.

kberry commented 4 years ago

P.S. And monospace?

wspr commented 4 years ago

I will add something to the doc, but just quickly — fontspec declarations only act on families, so that rules out sf and tt. You'd still want \setmainfont{cmur} \setsansfont{cmusf} \setmonofont{cmutt} (or whatever you call the .fontspec files).

kberry commented 4 years ago

ok, thanks. i guess i'm fundamentally confused. to me "mainfont" would mean the possibillity of setting everything, including sans and mono. because, well, that's what cm provides, and i think of my "mainfont" as cm. so there's no way \setmainfont{foo} can also specify the sans and mono? with the proliferation of superfamlies that do provide all those variants (rm, sans, mono), it seems like this would be a pretty desirable option.

does this happen in the system font case? \usemainfont{Noto Serif} also sets Noto Sans and Noto Mono? or i guess maybe this is what the .sty file does. how confusing

like, given \setmainfont{foo}, if foo.fontspec exists, could also look for foo-sans.fontspec and foo-mono.fontspec. but ok, maybe not ...

kberry commented 4 years ago

or, a fontspec file could contain a directive to read another fontspec fiole: sansfontspec = notosans.fontspec, monofontspec = notomono.fontspec, ...