[luatex] font expansion

Hans Hagen pragma at wxs.nl
Thu Jul 6 14:02:24 CEST 2017

On 7/6/2017 1:37 AM, Robert wrote:
> Hi,
>
> I'm resending this post from last year (19 April), as I never got an
> answer, and the questions still pertain to luatex 1.0.4:
>
> Firstly, the manual says:
>
> | When \adjustspacing has value 2, hz optimization will be applied to
> | glyphs and kerns. When the value is 3, only glyphs will be treated.
> | A value smaller than 2 disables this feature.
>
> However, what I see is:
> (regardless of whether the font is expanded with \expandglyphsinfont or

kerns are normally quite small so you will not really notice it and it
being a backend related property the log will not report expansion factors

in your font definition below you don't enable kerns anyway (unless
luaotfload does that automatically for you)

> So it seems that the former "compatibility" level 1 (same line breaks as
> without expansion), which according to the manual should no longer
> exist, still does; while the new level 3 does not (all the kerns are the
> same as for level 2). Could somebody explain this?
>
> Here's a test file:
> ----------
> \hsize=6cm
> \tracingoutput1
> \showboxdepth\maxdimen
> \font\x="Latin Modern Roman" at 10pt \x
> %\font\x="Latin Modern Roman:expansion=default" at 10pt \x
> \expandglyphsinfont\x 20 20 5 autoexpand
>    hz optimization will be applied to glyphs and kerns.
>    When the value is 3, only glyphs will be treated.
>    A value smaller than 2 disables this feature.\par}
> \z0\z1\z2\z3
> \bye
> ----------
>
> Secondly, I wonder about the status of the "autoexpand" qualifier to
> \expandglyphsinfont. AFAICT it is silently ignored, and fonts are always
> autoexpanded. Is this correct? Or would it still be possible to use
> pre-expanded font instances (say, from a MM font)?

it all depends on what magic you rmacro package does ... the \expand..
command works when no expansion has been set yet, otherwise you need to
pass values (and it depends in your case what 'default' does)
When I test the adjustments here it looks ok (it works).

Hans

-----------------------------------------------------------------