[lltx] problem with fontspec (luaotfload) & Libertine

Manuel Pégourié-Gonnard mpg at elzevir.fr
Fri Nov 5 13:24:10 CET 2010

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

> 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 :-)


> Thanks,
> -- Will

More information about the lualatex-dev mailing list