[NTG-context] \fontrange and \currentfontscale

Adam Lindsay ntg-context@ntg.nl
Mon, 5 Apr 2004 00:04:00 +0100

Hi Hans, TeXnicians.

I thought I'd take another look at the \fontrange macros (commented) at
the beginning of font-ini. I think they might be one way of adapting
different optical sizes for Unicode fonts. 

I'm trying to work in the current scaling, but I run into some pure
dimension math and expansion problems that are way beyond my skills. I
was hoping someone might be able to give me a push in the right direction:

 \def\dodofontrange#1 #2 %
   {\ifdim\dimexpr(\currentfontscale\bodyfontsize) #2%

results in:
! Missing = inserted for \ifdim.
<to be read again> 
<argument> s
\dodofontrange ...rentfontscale \bodyfontsize ) #2

which I interpret as \currentfontscale only being expanded as "sa 1.200"
instead of a number. 

At this point I can only make progress by blind experimentation. Can
anyone else offer a clue?

 Adam T. Lindsay                      atl@comp.lancs.ac.uk
 Computing Dept, Lancaster University   +44(0)1524/594.537
 Lancaster, LA1 4YR, UK             Fax:+44(0)1524/593.608