[lltx] Italic correction for upright fonts

jfbu jfbu at free.fr
Sat Dec 29 22:11:06 CET 2012


> Hi all,
> 
> In <http://tug.org/mailman/htdig/lualatex-dev/2011-March/001152.html> there was some discussion of the italic correction.
> 
> As far as I understand {RawFeature=+itlc} is now done by fontspec.
> 
> I am curious about the status of upright fonts. The following code snippet:
> 
> \documentclass{article}
> % compile either with lualatex or pdflatex
> \usepackage{iftex}
> \ifLuaTeX % for pdf output
> \usepackage{fontspec}
> \setmainfont[Ligatures=TeX]{TeX Gyre Termes}
> \else
> \usepackage[latin1]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage{tgtermes}
> \fi
> \begin{document}
> efg
> 
> e\/f\/g
> 
> \itshape
> 
> efg
> 
> e\/f\/g
> \end{document}
> 
> gives divergent results if compiled with luatex or pdftex.
> 
> In the latter case, we see that the upright font does have
> some italic corrections. The luatex compilation does display
> the italic correction in the italic font. It does not for
> the upright font.
> 
> I tried adding the Rawfeature=+itlc to the roman font features,
> to no avail (my hope was that fontspec did it automatically 
> only for the italic features)
> 
> Perhaps it just does not make sense to hope find italic correction
> data in a roman opentype font? (sorry, but I know nothing about fonts.)
> 
> Regards,
> 
> Jean-Francois


The reason I am asking is that it impacts the mathematical typesetting.

This

\documentclass{article}
\usepackage{fontspec} % comment this out for pdftex
\begin{document}
\Huge
$\mathit{f_i^i}$\par $\mathrm{f_i^i}$
\end{document}

with XeTeX, LuaTeX, and pdfTeX gives three different ouputs.

Italic corrections are used in math mode, and we see that XeTeX 
implements none, LuaTeX does but only for the italic font, and pdfTeX 
(with type 1 fonts) has them (of course) in both cases.

Regards,

Jean-Francois




More information about the lualatex-dev mailing list