[lltx] Problem with slanted fonts

Will Robertson wspr81 at gmail.com
Sun Sep 19 14:36:09 CEST 2010

On 19/09/2010, at 8:57 PM, Ulrike Fischer wrote:

> I have tracked it a bit down. The source is 1. that \slshape use sub
> in \DeclareFontShape and 2. that the "font declaration" is stored in
> a command.

None of this makes sense to me. I've tried playing with your example; see attached.
Even the order of which font comes first seems to break things; uncomment the \reverse line to see (if our results are the same, anyway); when uncommented, the output looks correct; when commented, the garbage appears again -- for both instances of \selectfont.

Also, \fontdesc is expanded before \DeclareFontShape, so that doesn't seem to be the (main) source of the problem.

Surrounding the font strings with braces instead of quotes also kills things (I suspect due to a LaTeX limitation).


-- Will

\newcommand\fontdesc{<->"name:XITS Math:mode=node;script=latn;language=DFLT;"}
\edef\x{\noexpand\DeclareFontShape {EU2}{testfam}{m}{n}{\fontdesc}{}}
\DeclareFontShape {EU2}{testfam}{m}{it}{<->sub*testfam/m/n}{}

\DeclareFontShape {EU2}{testfamb}{m}{n}{<->"name:XITS Math:mode=node;language=DFLT;script=latn;"}{}
\DeclareFontShape {EU2}{testfamb}{m}{it}{<->sub*testfamb/m/n}{}
\reverse % comment for the problem
{\fontfamily{testfam}[\selectfont] fam\\
\fontshape{it}[\selectfont] abc\\}
{\fontfamily{testfamb}[\selectfont] famb\\
\fontshape{it}[\selectfont] abc\\}

More information about the lualatex-dev mailing list