[lltx] Problem with slanted fonts

Ulrike Fischer news3 at nililand.de
Mon Sep 20 10:23:51 CEST 2010


Am Sun, 19 Sep 2010 19:50:09 +0300 schrieb Khaled Hosny:


> How I forgot that! internally, "Lucida Sans", "LucidaSans",
> "lucidasans", "L U ci DaS anS" all are the same to luaotfload, we will
> strip spaces and lower case font name before doing matching. So fontspec
> can just strip the spaces in some way (if not easy in tex, can be done
> in lua).

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

\documentclass{article}
\usepackage{ifluatex}
\ifluatex
 \usepackage{luaotfload}
 \font\test="name:Lucida Sans"
 \font\testb="name:Arial"
\else
 \font\test="Lucida Sans"
 \font\testb="Arial"
\fi


\begin{document}
\fontname\font \test \fontname\font \testb\fontname\font
\end{document}




-- 
Ulrike Fischer 



More information about the lualatex-dev mailing list