[luatex] Enable font expansion
Henri Menke
henrimenke at gmail.com
Sun Feb 10 23:24:07 CET 2019
Reading the documentation is key. Without luaotfload it's also pretty
easy to do.
---
% \pdffontexpand in pdfTeX
\expandglyphsinfont\font 30 20 10 autoexpand
\input knuth
\adjustspacing=2
\input knuth
\bye
On 11/02/19 11:19 AM, Henri Menke wrote:
> With luaotfload it's easy. There is a table with predefined expansion
> values in the fontloader, search for fonts.expansions.setups['default'].
> Without it I have no idea.
>
> ---
>
> \input luaotfload.sty
>
> \font\1="lmroman10-regular.otf:mode=node;expansion=default;+tlig;" at 10pt
> \1
>
> \input knuth
>
> \adjustspacing=2
>
> \input knuth
>
> \bye
>
>
> On 11/02/19 9:16 AM, Patrick Gundlach wrote:
>> Hello all,
>>
>> this has to do with my other problem, but I'd like to open a parallel thread. I believe that my problem is related to font expansion. So my question is:
>>
>> How do I enable font expansion for a specific font (loaded with luaotfload or without)?
>>
>> I have tried this, but this has almost no effect:
>>
>> ----------------------------------------------
>> \font\myfont="file:texgyreheros-regular.otf" at 10bp
>> \myfont
>> ----------------------------------------------
>>
>> and then this in Lua:
>>
>> ----------------------------------------------
>> tex.adjustspacing = 2
>>
>> local myfont = font.id("myfont")
>> tbl = font.getfont(myfont)
>> tbl.stretch = 40
>> tbl.shrink = 30
>> tbl.step = 10
>> tbl.auto_expand = true
>>
>> for i,v in pairs(tbl.characters) do
>> v.expansion_factor = 1000
>> end
>>
>> font.setfont(myfont,tbl)
>> ----------------------------------------------
>>
>>
>>
>> Patrick
>>
>>
>
More information about the luatex
mailing list