[NTG-context] Kerning and ligatures in math roman font

Hans Hagen pragma at wxs.nl
Mon Nov 9 16:44:34 CET 2015


On 11/9/2015 2:59 PM, Ulrike Fischer wrote:
> Am Mon, 9 Nov 2015 14:22:45 +0100 schrieb Hans Hagen:
>
>>> Yes, one workaround is to quit math mode. The other to use fonts in
>>> mode "base". But I would like to understand why workarounds are
>>> needed at all.
>
>> because opentype math fonts are just math fonts (simple for text, rich
>> for math)
>
> But there is no math font involved. This latex example
>
> \documentclass{article}
> \usepackage{fontspec}
> \begin{document}
> VA $\mathrm{VA}$
> \end{document}
>
> uses exactly one font:
>
> <d:/texlive/2015/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf>
>
> But outside math it is kerned, inside not.
>
> And this plain tex example doesn't use math fonts either.
>
> \input luaotfload.sty
>
> \font\Urm=Arial:mode=node;script=latn;language=DFLT;+tlig;+trep;
> \textfont0\Urm
> \Urm VA $\fam0 VA$ %no kerning in math
>
> \font\Urmbase=Arial:mode=base;script=latn;language=DFLT;+tlig;+trep;
> \textfont0\Urmbase
> \Urm VA $\fam0 VA$ %kerning in math
> \bye
>
> (I used Arial so that one can see clearly that a text font is used)

you don't enable kerning but anyhow, here is a context example:

\usemodule[oldotf]

\starttext

\showfontkerns

\font\Urm=arial:mode=node;+tlig;+trep;+kern;
\font\Urm=lmroman10-regular:mode=base;+kern;
\textfont0\Urm
\Urm VA $\fam0 VA$

\stoptext

basemode should work (no node mode in math but features are normal 
simple ... keep in mind that node lists in math are quite different)

Hans



-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list