[lltx] Problem with slanted fonts

Khaled Hosny khaledhosny at eglug.org
Mon Sep 20 13:01:11 CEST 2010


On Mon, Sep 20, 2010 at 12:52:40PM +0200, Ulrike Fischer wrote:
> Am Mon, 20 Sep 2010 12:31:31 +0300 schrieb Khaled Hosny:
> > 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. 

I did some experimentation, weired enough (at lest to me), quoting the
name in tfm.name works as expected, but the braces don't. Somewhere in
the chain the quotes are eaten before passing back to lua, but the
braces are not which will break font specification parsing.

> Brackets ("[" and "]") seems to work too. 

Brackets will (I think) force a name based lookup, which is not always
desired.

Regards,
 Khaled

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


More information about the lualatex-dev mailing list