[lltx] problem with fontspec (luaotfload) & Libertine

Khaled Hosny khaledhosny at eglug.org
Fri Nov 5 13:47:51 CET 2010

On Fri, Nov 05, 2010 at 01:24:10PM +0100, Manuel Pégourié-Gonnard wrote:
> Le 05/11/2010 05:26, Will Robertson a écrit :
> > On 05/11/2010, at 2:23 PM, Manuel Pégourié-Gonnard wrote:
> > 
> >> I'll try. In the meanwhile, I found that the following hack seems to fix the
> >> problem:
> >>
> >> \renewcommand\do at subst@correction{%
> > 
> I forgot to tell: I only added quotes around \fontname\font (in case it wasn't
> clear).
> > Thanks for looking into it. I have *no idea* why changing this macro fixes
> > the problem, but since the underlying cause is fixed (or seems to be fixed)
> > in fontspec.sty, I'll leave it as an academic exercise :)
> > 
> Well, I *guess* the explanation is something like:
> - \slshape triggers latex substitution mechanism, so LaTeX loads the italic font
> as \EU2/LinuxLibertineO(0)/m/sl/10
> - later it want to define \EU2/LinuxLibertineO(0)/m/it/10 to be the same thing
> (probably an optimisation) and tries do so by using \fontname\font to get the
> name of the current font
> - \fontname\font expands to:
> name:Linux Libertine O/I:mode=node;script=latn;language=DFLT;+tlig;+trep;
> an TeX obviouly think the font name stops at the space, hence tries to load
> "name:Linux " which fails. Quoting the font name fixes that.
> Now, my turn to have no idea: I have no idea what you did in fontspec to fix
> that without patching \do at subst@correction :-)

Fontspec just removes all spaces from font name now, since luaotfload is
already case and space insensitive ("Linux Libertine" will be eventually
normalised to linuxlibertine at luaotfload end, luaotfload even removes
hyphens an other non-alphanumeric characters).


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

More information about the lualatex-dev mailing list