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...@subst@correction{%
       \xdef\su...@correction{%
          \f...@name
          \global\expandafter\font
            \csname \c...@fontshape/\...@size\endcsname
            {\noexpand\fontname\font} %<--- braces
           \relax}%
       \aftergroup\su...@correction
}

So braces are probably ok. 

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

Reply via email to