Thanks Hans.
 
This works, except...
 
\usetypescriptfile[tps_timesnewroman]
\usetypescript[timesnewroman]
 
\usetypescriptfile[tps_verdana]
\usetypescript[verdana]
 
\def\myBodyFontSize{14pt}
\def\myHeadFontSize{14pt}
 
\setupbodyfont[verdana,\myBodyFontSize]
\setuphead[chapter][style={\switchtobodyfont[timesnewroman,\myHeadFontSize]}]
 
\starttext
\chapter{First Chapter}
\input knuth
\stoptext
 
(1) with for example
 
- bodyfont = verdana, head font = timesnewroman (or the reverse)
bodyfont size = 12pt, headfont size 12 pt => pdf is fine
bodyfont size = 13pt, headfont size 13 pt => chapter head is blank
bodyfont size = 14pt, headfont size 14 pt => chapter head is blank
 
(2) what to use instead of \definetypeface[myFont][...] to be able to write \setupbodyfont[myFont,...] and/or \switchtobodyfont[myFont,...] ?
 
Alan

On Thu, Feb 19, 2009 at 10:36 PM, Hans Hagen <pragma@wxs.nl> wrote:
Alan Stone wrote:
Hi,

BF = body font
HF = head font

A = arial
T = times new roman
V = verdana

OT = 12 = 12pt
OF = 14 = 14pt

See comments in fontswitch.tex

In attachment...

- fontswitch.tex: minimal example
- tps_arial.tex, tps_timesnewroman.tex, tps_verdana.tex: typescripts
- fontswitch.log for BFT14 + HFV14 -> font error ( same with BFA14 + HFV14 )
- fontswitch.pdf for BFT14 + HFV14 : chapter head is blank ( same with BFA14
+ HFV14 )

After testing different font(switching) combinations...

- BFA14 or BFT14 + HFVx with x not 14pt compile and print the generated pdf
fine
- BFV14 + HFV14 compiles and prints the generated pdf fine
- BFA12, BFT12, BFV12 + HFV14 or HFV12 compile and print the generated pdf
fine

Qué passa ?

you use undefined typefaces; in mkii we default to an empty fontclass which in turn will trigger default fallbacks (i.e. the main bodyfont has no fontclass) while in mkiv we default to the 'modern' fontclass; i'm still not sure if it will be kept this way but if so, i'll make a fallback again (this time to a default fontclass)

% \usetypescriptfile[tps_arial]         \usetypescript[arial]
\usetypescriptfile[tps_timesnewroman] \usetypescript[timesnewroman]
\usetypescriptfile[tps_verdana]       \usetypescript[verdana]

\def\myFontSizeOT{12pt}
\def\myFontSizeOF{19pt}

% \setupbodyfont[arial,        \myFontSizeOT]
% \setupbodyfont[timesnewroman,\myFontSizeOT]
\setupbodyfont[verdana,      \myFontSizeOT]

% \setupbodyfont[arial,        \myFontSizeOF]
% \setupbodyfont[timesnewroman,\myFontSizeOF]
% \setupbodyfont[verdana,      \myFontSizeOF]

% \setuphead[chapter][style={\switchtobodyfont[arial,\myFontSizeOT]}]
% \setuphead[chapter][style={\switchtobodyfont[timesnewroman,\myFontSizeOT]}]
% \setuphead[chapter][style={\switchtobodyfont[verdana,\myFontSizeOT]}]

\setuphead[chapter][style={\switchtobodyfont[arial,\myFontSizeOF]}]
% \setuphead[chapter][style={\switchtobodyfont[timesnewroman,\myFontSizeOF]}]
% \setuphead[chapter][style={\switchtobodyfont[verdana,\myFontSizeOF]}]

\starttext

\chapter{First Chapter}

\input knuth


-----------------------------------------------------------------
                                         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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________



--
Alan