[luatex] kerning with delimiters with opentype math fonts

Hans Hagen pragma at wxs.nl
Sat Feb 18 16:12:35 CET 2017


On 2/18/2017 3:13 PM, David Carlisle wrote:
> there is a full (plain TeX) example and screenshots in a (non)answer
> on stackexchange
>
> http://tex.stackexchange.com/a/354485
>
> but in brief:
>
> \left| T \right|
>
> has a kern between the T and the right hand | matching the kern in |T|
>
> if tfm fonts are used in luatex or xetex or pdftex
>
> but if Opentype Latin modern is used
>
> xetex shows the kern but luatex has no kern once \right or \Uright are
> used, but does still show the kern with |T|.
>
> I'm not sure if this is a luatex or luaotfload issue?

It's a font issue ... try pagella or so ... latin modern has old math 
font like properties so it has char boundingboxes / widths that assume 
that italic correction is added.

For opentype fonts luatex doesn't use the traditional 8 bit font code 
path. Early versions had a kind of hybrid but that failed miserably when 
more opentype mathfonts came around and messy heuristics were dropped in 
favour of separate code paths (not even lua magic could beat that so i 
dropped most of that kind of hackery from context). Kerns have similar 
issues as opentype has staircase kerns.

I can of course add a pseudo feature to the font loader that adds italic 
to the width for fonts that need that. I might also cook up some magic 
related to fences but again it's a macro package issue then.

The best solution is proper fonts.

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