[NTG-context] Ugly bug with TikZ in recent ConTeXt MKIV

Hans Hagen pragma at wxs.nl
Thu Nov 18 18:32:32 CET 2010


On 18-11-2010 5:56, Vedran Miletić wrote:
> 2010/11/18 Hans Hagen<pragma at wxs.nl>
>
>> After some tracing and hard thinking Taco and I found interesting spaces
>> showing up in the output that result from a kludge in tikz:
>>
>> Normally one will use \ignorespaces to catch spurious spaces but tikz
>> invokes \nullfont assuming that its fontdimen 2 is zero. But, in context it
>> no longer is (prelude to delayed font loading).
>>
>> You can put this in cont-new.mkiv as a temporary hack
>>
>> \let\normalnullfont\nullfont
>>
>> \def\nullfont
>>   {\fontdimen1\normalnullfont\zeropoint
>>    \fontdimen2\normalnullfont\zeropoint
>>    \fontdimen3\normalnullfont\zeropoint
>>    \fontdimen4\normalnullfont\zeropoint
>>    \fontdimen5\normalnullfont\zeropoint
>>    \fontdimen6\normalnullfont\zeropoint
>>    \fontdimen7\normalnullfont\zeropoint
>>    \normalnullfont}
>>
>>
> Perhaps this should be forwared to Christian Feuersaenger. He is very open
> to bug reports and will probably be willing to fix it in some way in TikZ.

feel free to do so; probably something like this is needed:

\def\pushnullfont
   {\edef\popnullfont
      {\fontdimen2\nullfont\the\fontdimen2\nullfont
       \fontdimen3\nullfont\the\fontdimen3\nullfont
       \fontdimen4\nullfont\the\fontdimen4\nullfont}%
    \fontdimen2\nullfont 0pt\relax
    \fontdimen3\nullfont 0pt\relax
    \fontdimen4\nullfont 0pt\relax}

\pushnullfont
....
\popnullfont

as fontdimens are assigned global.

Hans

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


More information about the ntg-context mailing list