[metapost] draw a single-stroke curve

Dan Luecking luecking at uark.edu
Sun Feb 5 08:23:03 CET 2012


At 10:44 PM 2/3/2012, you wrote:
>hi list
>
>I want to produce a single-stroke curve in
>metapost and import to fontforge, a vector
>font editor.
>
>I used the "draw" command and output to
>a ps file, then import the ps file to fontforge.
>I realize that, even I set the pen width to 0, the
>imported ps graph is always an outline object:
>every stroke is a thin closed contour.
>
>what command I should use in metapost to
>produce a ps file that can have single-stroke
>one-directional curves?

I can't tell what you want. If you want a penstroke
to be visible, you can't set its width to 0. If you
set the width to 0, then you need to make a closed
contour and use the "fill" command, not "draw".

If you want the effect of a calligrapher's penstroke,
metapost has a "penpos" command to determine a shape
followed by a "penstroke" command to produce that shape.
Despite the name, "penstroke" actually outputs a filled
contour emulating the sroke of a calligrapher's pen.

It would be useful to see an example of what you are doing
(i.e., the actual metapost code) to produce a picture of a
"single-stroke, one-directional curve".

Dan


Daniel H. Luecking
Department of Mathematical Sciences
Fayetteville, Arkansas
http://www-cs-faculty.stanford.edu/~knuth/iaq.html 



More information about the metapost mailing list