[XeTeX] Font scaling problem

Will Robertson will at guerilla.net.au
Mon Oct 18 01:48:16 CEST 2004


Hi all

I'm trying to add scaling to my fontspec package, but I'm getting an 
error. Can anyone explain to me why my appended example fails? If the 
scaling string s*[0.5] is removed I have no problem.

Basically it works if the commands are entered manually, but not if 
they're put into a command. I'm stumped - help would be greatly 
appreciated!

Will

%&program=xelatex

\documentclass[12pt]{article}

\newcommand\mkfont{
\DeclareFontFamily{U}{fontB}{}%
\DeclareFontShape{U}%
     {fontB}{m}{n}{<-> s*[0.5] "Didot"}{}%
}

\renewcommand\encodingdefault{U}
\begin{document}

\DeclareFontFamily{U}{fontA}{}%
\DeclareFontShape{U}%
     {fontA}{m}{n}{<-> s*[0.5] "Didot"}{}%

this is normal text
{\fontfamily{fontA}\selectfont this is the scaled font}

\mkfont
this is normal text
{\fontfamily{fontB}\selectfont this is the scaled font}

\end{document} 



More information about the XeTeX mailing list