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)
 
At first I didn't understand a thing about your answer, however after digging a bit further and finding out that when replacing 14pt with 14.4 pt ( re: \showbodyfontenvironment table ) it works again. Guess I now understand what "fallbacks"means. :O)
 
For future reference...
http://en.wikipedia.org/wiki/Typeface
http://en.wikipedia.org/wiki/Fallback_font
 
Alan
 
 
% \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