[lltx] Problem with slanted fonts

Ulrike Fischer news3 at nililand.de
Mon Sep 20 12:52:40 CEST 2010


Am Mon, 20 Sep 2010 12:31:31 +0300 schrieb Khaled Hosny:



>> Well naturally stripping space is a solution which I already
>> mentioned at the begin of the thread. Nevertheless it is interesting
>> why it fails for luatex but not with xetex and I think I found the
>> reason: \fontname works differently.
>> 
>> In following example xetex returns the fontnames of the system fonts
>> surrounded by quotes ("Lucida Sans Regular", "Arial", but cmr10
>> without quotes) while luatex/luaoftload returns all fonts without
>> quotes: name:Lucida Sans. name:Arial. As during substituation
>> \fontname\font is feeded back to a font command luatex now looks due
>> to the missing quotes for the font name:Lucida
 
> I had that feeling it is related to \fontname, it caused a nasty bug
> before, and now this one.
> Now, does surrounding fontname with brackets works too, or only quotes?
> It can be easily fixed in luaotfload (we populate the name field of the
> tfm table of the font).

Well I tried this redefinition and it worked fine with lualatex
(only with lualatex! pdflatex and xelatex don't like the additional
braces).  

\makeatletter
\def\do at subst@correction{%
       \xdef\subst at correction{%
          \font at name
          \global\expandafter\font
            \csname \curr at fontshape/\f at size\endcsname
            {\noexpand\fontname\font} %<--- braces
           \relax}%
       \aftergroup\subst at correction
}

So braces are probably ok. 

Brackets ("[" and "]") seems to work too. 
-- 
Ulrike Fischer 



More information about the lualatex-dev mailing list