On 2017-01-20 23:54, Alan Braslau wrote:
On Fri, 20 Jan 2017 22:33:40 -0500
Rik Kabel <context@rik.users.panix.com> wrote:

Can anyone suggest a better way to compose such symbols than using
the raw TeX commands used here? Is there a more ConTeXt-ish way to do
this? Is it possible to get options to center the glyphs from which
the symbol is assembled (separate horizontal and vertical, with the
ability to offset them)?

Is there a ConTeXt way other than \definesymbol to create such
combined symbols?
MetaPost (with textext())?

Thank you for that, Alan. I hadn’t ever used MetaPost before, thinking it was too complex for my needs. Now I see it may be quite useful.

So, how can I make the inner glyph (‘?’ in the example below) transparent, so that the background shows through along with anything else that lives on a lower layer? I’ve seen a method for constructed shapes, but nothing that I can apply to text glyphs. Undraw doesn’t do it.

  \setupbackgrounds
   [page]
   [background=color,backgroundcolor=yellow]
 \definefont
   [DVSrB]
   [file:DejaVuSerif-Bold.ttf]
 \startuseMPgraphic{HeartTest}
   picture h;
   h := "♥" infont "\truefontname{DejaVuSerif-Bold.ttf}" scaled 20;
   picture q;
   q := textext("{\DVSrB ?}") scaled 10;     % just a different way
   q := q shifted - (xpart center q, 12pt) ;
   draw h withcolor blue;
   undraw q;                                   % this doesn't do it
 \stopuseMPgraphic
 \starttext
   \useMPgraphic{HeartTest}
 \stoptext

--
Rik