3 May
2012
3 May
'12
1:13 a.m.
On 2012-05-02 Aditya Mahajan
Metapost now runs as a library. All the text is first typeset by ConTeXt and metapost only knows the bounding box of the labels.
You can try (untested):
\starttext
This is serif
\switchtobodyfont[sans] \startMPcode draw textext("This should be sans"); \stopMPcode
\stoptext
This works, of course. However it continues with sans font even after \stopMPcode. This is better (but clumsy): \start \switchtobodyfont[sans] \startMPcode draw textext("This should be sans"); \stopMPcode \stop Here serif again. The text in Metapost adapts to the text set in ConTeXt. But the font setup should *only* be set for MetaPost, not regular text. Does that mean, that MPenvironment is deprecated and does not work at all? Marco