[XeTeX] Font scaling problem

Jonathan Kew jonathan_kew at sil.org
Mon Oct 18 11:10:14 CEST 2004


On 18 Oct 2004, at 9:57 am, Ross Moore wrote:

> Hi Jonathan and Will,
>
> On 18/10/2004, at 5:32 PM, Jonathan Kew wrote:
>
>> To demonstrate that this is the problem, you can wrap your \mkfont 
>> **definition** so that the proper NFSS catcodes are in effect:
>>
>> {\makeatletter \nfss at catcodes \globaldefs=1
>>  \newcommand\mkfont{
>>  \DeclareFontFamily{U}{fontB}{}%
>>  \DeclareFontShape{U}%
>>     {fontB}{m}{n}{<-> s*[0.5] "Didot"}{}%
>>  }
>> }
>>
>> Then it will work as expected.
>
> Uh uh -- no it won't ...

Oh yes it will.... :-)

>   ... since \mkfont is undefined upon leaving that last '}'
> closing the \makeatletter grouping.

....since \globaldefs=1 makes the definitions executed by 
\newcommand\mkfont global by default, so your added step using 
\global\let is unnecessary.

True, that's probably not how it would be done in a real package, as 
it's nice to minimize global definitions, and I don't know quite what 
\newcommand may do internally. I was just doing a minimal test to check 
that the explanation of Will's problem was the right one. But the 
example did work as written---at least, it did when I tried it.

FWIW,

JK



More information about the XeTeX mailing list