[luatex] OpenType problems
Taco Hoekwater
taco at elvenkind.com
Mon Feb 2 12:13:13 CET 2009
Javier Múgica wrote:
> I finally got started with LuaTex. I loaded OpenType fonts with the
> sample code form the wiki and the fixes suggested by Jonathan some
> months ago. I get this very different spacing with lmr10:
>
> \input otffont.ltex %Here is the callback
> \font\tenrm=ec-lmr10
> \font\ottenrm=LMRoman10-Regular
>
> \setbox0 \hbox{\tenrm{} } \showthe\wd0
>
> 3.33333 pt
>
> \setbox0 \hbox{\ottenrm{} } \showthe\wd0
>
> 2.5 pt
>
> Any ideas how to solve it?
You have to fix the setting of f.parameters.space in the callback,
it should use the width of the actual space instead of a hardcoded
0.25 * size. Adding a
if f.characters[32] then
f.parameters.space = f.characters[32].width
end
at the end (after all the other character calculations) should be
sufficient. A similar problem exists with the x_height parameter.
Best wishes,
Taco
More information about the luatex
mailing list