[luatex] [lltx] fontspec prevents hyphenation

Khaled Hosny khaledhosny at eglug.org
Sun Nov 28 15:46:32 CET 2010


On Sun, Nov 28, 2010 at 02:13:21PM +0100, Philipp Stephani wrote:
> Am 28.11.2010 um 12:40 schrieb Khaled Hosny:
> 
> > It seems deeper than fontspec, either in luaotfload or something deeper
> > inside latex. This gives the same result:
> > 
> > \documentclass{article}
> > \usepackage{luaotfload}
> > \usepackage[EU2]{fontenc}
> > \usepackage[width=2cm]{geometry}
> > 
> > \begin{document}
> > An intere\textit{st}ing word.
> > 
> > An intere{\itshape st}ing word
> > \end{document}
> 
> LaTeX uses the first font dimension in the italic correction code. This number must be strictly positive for italic fonts.
> 
> \documentclass{article}
> \begin{document}
> \textit{\the\fontdimen1\font}
> \end{document}
> 
> compiled with pdfLaTeX results in 0.25pt, but
> 
> \documentclass{article}
> \usepackage{luaotfload}
> \usepackage{lmodern}
> \usepackage[EU2]{fontenc}
> \begin{document}
> \textit{\the\fontdimen1\font}
> \end{document}
> 
> compiled with LuaLaTeX results in 0.0pt.

I though italic correction is handled internally by the engine, it is a
character not a font property AFAIK. Since OpenType has no support for
italic correction (except in MATH table), luaotfload (read ConTeXt) has
a pseudo feature, 'itlc', that guesses italic correction value but
neither fontspec nor EU2 .fd files are using it currently. The file
bellow is hyphenated just fine and italic correction is applied, though
I'm getting more confused and I actually lost track of what the original
issue was.

\documentclass{article}
\usepackage{fontspec}
\setmainfont[
    ItalicFeatures={RawFeature={+itlc}}
]{Latin Modern Roman}
\usepackage[width=2cm]{geometry}

\begin{document}
An inter\textit{est}ing word.

An inter{\itshape est\/}ing word.
\end{document}


Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


More information about the luatex mailing list