[lltx] How to specify an instance name with a space for a variable font in luaotfload

Bruno Voisin bvoisin at icloud.com
Wed Jul 13 01:04:59 CEST 2022


The subject says most of it already: using luaotfload's recent capability of dealing with variable fonts, is it possible to specify an instance name containing a space?

One example is the venerable Skia.ttf from macOS. Among its predefined variations is for example (in ttx syntax)

	<!-- Light Extended -->
	<NamedInstance flags="0x0" subfamilyNameID="299">
	<coord axis="wght" value="0.48"/>
	<coord axis="wdth" value="1.3"/>
	</NamedInstance>

I tried every way I could think of, for specifying "Light Extended" as instance name, like

	\font\mytestfont="Skia:instance=Light Extended"

putting "Light Extended" between braces, double quotes, single quotes, back quotes, inputting the space as \␣ or \space, replacing it by _. Nothing seems to work.

Not using the instance name and specifying the weight and width instead does work though, as in

	\font\mytestfont="Skia:axis={wght=0.48,wdth=1.3}"

I'm starting to think the current luaotfload code cannot deal with space-containing instance names. Hopefully I'm wrong. Or maybe I'm interpreting the ttx output wrong and "Light Extended" isn't the actual instance name.

Bruno Voisin

PS Please cc the answer to me, I'm not subscribed to the list.







More information about the lualatex-dev mailing list.