Yes, the code given by Seyal gives only the circle vith eyes and mouth without colors (on my computer). But, It seems that one have to deal with a more complex lines of code. If I'm not mistaken, MetaPost alone natively supports only the 3 colours red, green and blue. To support CMYK colour gradients, MetaPost needs to work with Metafun (see here : https://wiki.contextgarden.net/Color_in_MetaPost).

Perhaps an image in *.png format is required. But I can't give any advice, as I'm not an experienced MetaPost/Metafun user.

see this code below and the result as attached file :

\starttext

\input tufte


\externalfigure[smile.svg][conversion=mp]

\stoptext


Best//JP


Le 12/03/2024 à 15:01, Henning Hraban Ramm a écrit :
Am 12.03.24 um 14:53 schrieb seyal zavira:
     > when i want to put some SVGs in my document the svg does not
    render properly here is the code:
     >
     > \starttext
     > \startMPcode
     > draw lmt_svg [
     > filename = "smile.svg"]
     > \stopMPcode
     > \stoptext

I can confirm the problem also with the regular image call

\externalfigure[smile.svg][conversion=mp]

Hraban
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Attachment: ctx-test-metapost-svg.pdf
Description: Adobe PDF document

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to