[NTG-context] Fonts switching and styles ..

Hans Hagen pragma at wxs.nl
Mon Nov 22 14:26:15 CET 2004

Dirar BOUGATEF wrote:

> I have tried style={\switchtobodyfont[karat]} and it works. Now how to 
> switch to a different size without going through:

you can do things like:

\usetypescript [sans][karat][map,name]

to load the appropriate defs

> \definefont[MyPartFont][SansBold at 24pt]
> \setuphead[part][style=\MyPartFont]
> The problem i see here is that i have to go through 
> \setupbodyfont[karat] and that i can't say something like:
> \definefont[MyPartFont][karat at 24pt]

actually you can, goven that karat is known

Serif SerifBold Sans SansItalic
Karat KaratBold (or maybe Karat-Bold) texnansi-karat

are all valid in a \definefont

> Lets say i have 5 fonts in my document i only want to say 
> \setupbodyfont[MyMainFont] once, then i should have other mecanisms for 
> switching properly to other fonts at different sizes.
> Why does \definefont maps only from Sans, Serif, SansBold etc. ? This is 
> quit fastidious, cause for this to work we have to use \setupbodyfont 
> first and follow the steps above.
> I may be missing something out there ..

i think so -)


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl

More information about the ntg-context mailing list