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

OSF in the SmallCaps font file #479

Closed Mariusz-W closed 6 months ago

Mariusz-W commented 2 years ago

I don’t see how fontspec handles a situation, common with older OpenType font families, when the Roman OldStyleFigures reside in the SmallCaps font file. I don’t find a word about it in the current fontspec documentation.

Something along the lines of :

SmallCapsFont = ⟨font name⟩ or SwashFont = ⟨font name⟩

would be welcome.

The issue is important for me as there are many such font families available, some very refined.

Mariusz-W commented 2 years ago

I prepared a tutorial in which I provide a temporary solution to the problem that a user of X∃LATEX and fontspec is facing when the desired set of glyphs for digits are located in external expert or SmallCaps font files.

wspr commented 6 months ago

Unfortunately this is not possible unless you use luaotfload to create custom virtual fonts. There isn't a standard or convenient mechanism in XeTeX or LuaTeX to switch fonts for certain characters for fontspec to provide an interface to.