[luatex] font expansion
Hans Hagen
pragma at wxs.nl
Sat Jul 8 17:26:34 CEST 2017
On 7/8/2017 12:16 AM, Robert wrote:
> On 07.07.17 18:34, Hans Hagen wrote:
>> AFAIK one can make an instance of such fonts and use that.
>
> But that's what I've been asking about the whole time: whether it is
> possible to use instances instead of autoexpanding (ie., linear
> distortion). And my tests led me to believe that this is, in contrast to
> pdftex, *not* possible with luatex, which was corroborated by what you
> said in your last post:
I'm out pf th epdftex dev loop for a while but i wonder if it really
creates instances from multiple masters. What it did was create copies
of fonts i.e. the tfm character data with different widths for
characters so that the par builder can use that info when breaking into
lines. Then the backend adds that instance (when used) which is nothing
more that using the same font with a different width array and applying
a different horizontal scaling. Luatex does not need to create the copies.
In the early (research) time of pdftex it could embed metafony instances
and create them runtime and/or use fonts with a scale added to the
filename given that a map file provides the real thing. But again, the
engine itself created no instances.
>> Because we don't have pre-generated (copies of) fonts at all
>
> ?
See above: pdftex creates a copy of the tfm data with different widths.
Also pdftex shares font instances (so best not change properties of a
font in a global way what is actually happening when later on glyphs
scaling is applied). Luatex doesn't do that.
>> Concerning variable fonts: these are already supported for a while
>
> Does this mean that the width axis will be taken into account for
> expansion?
No, as currently the hard coded mechanism is using scaling. But its
trivial to kick in a copy with a scaled axis in an extra (lua driven)
pass given that there is a variation in the font that is tuned for it
(which i doubt, because often other properties (region related and so)
also change). I will probably do that once there are useable public and
free fonts.
(Btw, most people won't see the difference between a few pct horizontal
scaling and some axis driven thing ... what we do see is annoying
excessive scaling which unfortunately shows up more and more and for me
that is then a don't read decision.)
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