![](https://secure.gravatar.com/avatar/02a711d78d02355347d6cff73fda2572.jpg?s=120&d=mm&r=g)
2 May
2012
2 May
'12
7:13 p.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