[NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

Hans Hagen j.hagen at xs4all.nl
Thu Dec 10 22:36:59 CET 2020

On 12/10/2020 8:37 PM, Aditya Mahajan wrote:
> On Thu, 10 Dec 2020, Hans Hagen wrote:
>>> dotlabel uses a pen to draw the dot, and I am not sure why it uses that rather
>>> than a path. Here is a (to me) simpler definition, where you can change the
>>> shape:
>> just look in the pdf ... in your case the dot is a n point path while otherwise
>> it uses the default postscript pen (which is a dot)
> Ah, that makes sense.
>> it surprised me that a math guru like you doesn't do this:
>> vardef dotlabel@#(expr s,z) text t_ =
>> %     draw textext("$\bullet$") scaled (1/2) shifted z ;
>> %     draw textext("$\blacktriangle$") scaled (1/4) shifted z ;
>>      draw textext("$\blacksquare$") scaled (1/4) shifted z ;
>>      label@#(s,z) t_ ;
>> enddef ;
>> \stopMPdefinitions
> Ha! I know that you said this as a joke, but as someone who did try to use the old font-based picture environment in LaTeX back in the day, I would never try to use fonts for "drawing". Especially, math fonts, where every designer has a different idea of what the shape should look like.
ah pictex memories ... drawing lines with cmr5 periods ...

but actually, we can define a stable font with symbols in metafun and 
use that (quite efficient too) and then one can even cut'n'paste those 
tiny symbols (don't worry ... not much of a challenge so low on my list)


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

More information about the ntg-context mailing list