Open kberry opened 4 years ago
P.S. And monospace?
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).
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 ...
or, a fontspec file could contain a directive to read another fontspec fiole: sansfontspec = notosans.fontspec, monofontspec = notomono.fontspec, ...
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.