[metapost] Stroke Font

Hans Hagen pragma at wxs.nl
Sun May 17 00:12:36 CEST 2015


On 5/16/2015 3:37 PM, Troy Henderson wrote:
> Is there a preferred method for converting a
>
> btex Here is my sentence etex
>
> from a picture to an array of closed paths that can be filled and
> stroked different colors?  Thus, I would like to convert the btex ...
> etex sentence picture into an array of outlines for each letter (in the
> current font) used in the sentence so that I can fill the outlines one
> color and draw them with another color.

\starttext

     \startMPpage
         graphictext("\input zapf\relax")
             withfillcolor red
             withdrawcolor blue
             withpen pencircle scaled 1pt ;
     \stopMPpage

     \startTEXpage
         \startoverlay
             {\framed
                 [align=normal,foregroundcolor=red]
                 {\starteffect[inner]\input zapf\relax\stopeffect}}
             {\framed
                 [align=normal,foregroundcolor=blue]
                 {\starteffect[outer]\input zapf\relax\stopeffect}}
         \stopoverlay
     \stopTEXpage

\stoptext



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the metapost mailing list