[luatex] [lltx] fontspec prevents hyphenation

Khaled Hosny khaledhosny at eglug.org
Sun Nov 28 16:36:14 CET 2010


On Sun, Nov 28, 2010 at 04:21:56PM +0100, Philipp Stephani wrote:
> 
> Am 28.11.2010 um 15:46 schrieb Khaled Hosny:
> 
> > 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.
> 
> This doesn't work because LaTeX inserts \/ before "est" since the first font dimension is zero.

That is why I'm confused, it works. Ah, wait, I was experimenting with
setting \fontdimen1 and I though I deleted that code but I just found it
was still their, that is why it is working for me.

> > 
> > An inter{\itshape est\/}ing word.
> > \end{document}
> 
> This works because LaTeX doesn't insert \/ here.
> Either fontspec has to patch the LaTeX kernel, or the first font dimension for italic fonts must be set to a positive value by luaotfload.

I can confirm that, thanks for explanation. We can test if the font has
italic angle and set \fondimen1 accordingly, I just don't know how to
map the former to the later and don't want to set some seriously broken
value that would break something else.

Regards,
 Khaled

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


More information about the luatex mailing list