[NTG-context] A font question.

Hans Hagen pragma at wxs.nl
Fri Dec 23 10:19:55 CET 2005


Taco Hoekwater wrote:

> Hi John,
>
> John R. Culleton wrote:
>
>> I use Context for highly formatted non-fiction, but I am a bit
>> reluctant to use it for much of my work because of the strange
>> (to me) font handling arrangements. I see no purpose for the
>> multiple synonyms of the same font. That just adds layers of
>> extra work.
>
>
> It also adds layers of configurability. Clearly you do not
> need that (your font setups is extremely simple and low-level),
> but lots of other people do. For example, I have documents that
> use 6 totally different font sets, because all 'examples' and
> 'definitions' are typeset in font families that differ from
> the normal text font family. It would be a nightmare if I had to
> define and remember the 200+ font definitions by hand.


Also, when you want some special size, by using the synonyms you can say 
\definedfont[Serif at 123pt] without worrying about what the current 
serif is.

Many years ago, Taco wrote a style for the dutch math journal which had 
several font sets, complex columns, mixed encodings per document, etc  
(i still do not understand how he managed to do it in those-days context 
-). A few years later when some specs changed I was asked to rewrite 
those styles and in the process typescripts (font classes), column sets 
(complex figure placement) and some more things evolved.  Since then 
Taco and I have less nighmares -)

>> So here is my question. If I set up my own font definition
>> system and as part of it I have statements like:
>> \font\tfa bchr8r at 10.45pt
>> \font\tfb bchr8r at 11.37pt
>> ...
>> ... will the rest of Context accept the above tfb font and size in 
>> places
>> where a heading macro automatically defaults to tfb?
>
>
> Only if you never make any \{setup,switchto}bodyfont switches after
> your new font definitions.


if you want that, you'd say:

\definefont[MyNiceBigFont][bchr8r at 10.45pt]

or better:

\usetypescript [serif] [charter] [ec]

\definefont[MyNiceBigFont][Charter-Roman at 10.45pt]

in which case you at least see what font is used, and more important, 
you get the encoding for free

\setuphead[chapter][style=\MyNiceBigFont]

btw, if there is a system behind those sizes, you can say:

\definebodyfontenvironment
  [default]
  [a=1.045,
   b=1.137]

and such which lets the a-d sizes scale that way


Hans


More information about the ntg-context mailing list