[XeTeX] Support of variable OpenType fonts

Bruno Voisin bvoisin at icloud.com
Tue Jul 12 16:17:00 CEST 2022


Does XeTeX support variable OpenType fonts, or is the addition of their support planned at some point?

There does not seem to be any clear statement on the net about this, but based on

https://tex.stackexchange.com/questions/355104/tex-luatex-xetex-fontspec-support-for-opentype-variable-fonts
https://sourceforge.net/p/xetex/feature-requests/28/

I have the impression there's no such support yet.

I'm asking because the next version of macOS, currently in public beta, includes the STIX Two fonts in a slightly more recent version than TeX Live (2.13 b171 for macOS vs 2.12 b168 for TL).

The math font is in OTF format, same as in TL, but the text fonts are in variable OpenType format, actually the files

	STIXTwoText[wght].ttf
	STIXTwoText-Italic[wght].ttf

from the official STIX Two distribution renamed as

	STIXTwoText.ttf
	STIXTwoText-Italic.ttf

respectively.

Loading the fonts with LuaTeX and luaotfload, use of

	\font\testfont="STIX Two Text"
	\font\testfont="STIX Two Text Medium"

works and gets the fonts from TeX Live, while

	\font\testfont="[STIXTwoText.ttf]"
	\font\testfont="[STIXTwoText.ttf]:instance=medium"

gets the font from macOS. Similarly

	\fonttest{STIX Two Text Italic}
	\fonttest{STIX Two Text Medium Italic}

for TL becomes

	\fonttest{[STIXTwoText-Italic.ttf]}
	\fonttest{[STIXTwoText-Italic.ttf]:axis={weight=medium}}

for macOS (for some reason instance= doesn't work in this latter case). See the attached test file.

So I was wondering whether the same could be achieved with XeTeX.

The question is futile regarding STIX Two (the fonts in TeX Live are perfectly fine). But this was my first encounter with variable OpenType fonts ever in the real world, and I imagine the use of such fonts will become more widespread as time goes.

Bruno Voisin

PS Please cc possible answers to me, as I'm no longer subscribed to the list.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-stixvariable.pdf
Type: application/pdf
Size: 77676 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20220712/f4f17280/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-stixvariable.tex
Type: application/octet-stream
Size: 1397 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20220712/f4f17280/attachment-0001.obj>


More information about the XeTeX mailing list.