[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:
> * a difference between \adjustspacing=0 and \adjustspacing=1,
> * a difference between \adjustspacing=1 and \adjustspacing=2,
> * no difference between \adjustspacing=2 and \adjustspacing=3
> (regardless of whether the font is expanded with \expandglyphsinfont or
> via the luaotfload interface).
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
> \showboxbreadth\maxdimen
> \showboxdepth\maxdimen
> \input luaotfload.sty
> \font\x="Latin Modern Roman" at 10pt \x
> %\font\x="Latin Modern Roman:expansion=default" at 10pt \x
> \expandglyphsinfont\x 20 20 5 autoexpand
> \def\z#1{\adjustspacing=#1 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.\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
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
More information about the luatex
mailing list