[metapost] is it possible to strike glyphs' paths?

Stephan Hennig mailing_list at arcor.de
Fri Jan 28 01:49:35 CET 2011


schrieb Vadim Radionov:

> Is it possible to decompose the picture obtained with btex .. etex and then
> draw all the glyphs' paths with (white) pen of non-zero width?

You can a) decompose pictures into bunches of glyphs and you can b)
access glyph strokes.  But there's no robust solution that I know of to
glyph-wise string decomposition in a picture to get glyph coordinates
without considering font metrics.  That is, a 'textual' might by a
single character, in which case you can further decompose its glyph into
strokes.  But sometimes a 'textual' is a whole bunch of characters,
making guessing the coordinates of single glyphs hard, and hence their
glyph strokes.

In the texpath package, character-wise access to text is forced by
letter-spacing all text (and removing that letter-spacing later again).
 But this is really a crude hack.  It's unfortunate that there's no
character-wise access to 'textuals' in MetaPost.


> My goal is to make a label on the complex picture more legible, but
> unfilling its bbox cuts too much.
> The way i use right now is drawing the same picture with white color
> shifting it slightly in several directions, but i hope there exists a
> correct way to do it.

There is a LaTeX package 'contour' that does exactly that, AFAIU.  Maybe
this helps.

Best regards,
Stephan Hennig


More information about the metapost mailing list