[dev-context] [NTG-context] strange font switching (bug?)

Hans Hagen pragma at wxs.nl
Wed Jul 19 01:30:25 CEST 2006


Taco Hoekwater wrote:
> Hi,
>
> Mojca Miklavec wrote:
>   
>> Hello,
>>
>> can anyone explain this weird behaviour? The accents on the second
>>     
>
> Just for debug information, this helps:
>
> ---
> \def\xxdododefinefont#1#2#3#4% \autofontsizetrue is set by calling routine
>    {\edef\lastfontidentifier{#3}%
> -   \ifcsname\newfontidentifier\endcsname\else
> +   \iftrue
>       \def\localrelativefontsize{#1}%
>       \def\localabsolutefontsize{#2}%
>       \parsefontspec{#4}\newfontidentifier
>       \let\localrelativefontsize\defaultrelativefontsize % not needed
>     \fi
>     \csname\newfontidentifier\endcsname
>     \autofontsizefalse
>     \ifskipfontcharacteristics \else
>       \setfontcharacteristics
>       \the\everyfontswitch
>     \fi}
> ---
>
>   
thanks; i guess that we have to do with some math (default encoding) vs 
serif (whatever encoding) mix up, i.e. they share fonts in lm/cm

a bit less efficient but probably ok is the followign patch (\fontstyle 
added):

\def\newfontidentifier{*\fontclass\lastfontidentifier\fontstyle\fontsize*}


Hans  

-----------------------------------------------------------------
                                          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 dev-context mailing list