I'm trying to design a font in METAPOST and/or METAFONT. Rather, more specifically, I'm trying to 'digitize' a particular font using METAPOST to emulate the shape. My goal is to use as natural an idiom as possible, as well as to allow for Computer Modern-like tunability. However, one thing I've noticed is that there are certain things which are (given my knowledge of it) difficult to express. For example, here's a lowercase letter 'h':

enter image description here

The strokes are in blue and white (obviously incomplete) and the shape of the original is shown in a thin black line. What you will notice is that the blue stroke meets the red stroke very sharply, quite unlike the original. Is there any to deal with this in a fairly natural idiom? Apparently there is METAPOST code out there which can do boolean operators. So, could I take the union of the blue and red path and smooth all edges? Or is such a thing just impossible? If not that, then what would be the best way achieve my desired effect (short of just using bezier curves, since I want to be able to reuse code).

Here's the METAPOST code:

prologues := 3;
outputformat:="eps";
outputtemplate:="%j.eps";

beginfig(1)

z1=(123,670);
z2=(117,25);
z3=(125,333);
z4=(365,340);
z5=(406,25);

pickup pencircle scaled 70 yscaled .55 rotated 0;
draw z1 .. z2 withcolor 0.3[red,white];

pickup pencircle scaled 80 yscaled .46 rotated 30;
draw z3{dir 45} .. z4{dir -60} .. {dir -90}z5 withcolor 0.4[blue,white];

pickup pencircle scaled 0.5;

draw (293,8)
-- (293,15)
..controls (293, 36) and (306, 32) .. (350, 38)
..controls (370, 41) and (370, 49) .. (370,125)
..controls (370,269) and (347,308) .. (322,335)
..controls (302,355) and (273,371) .. (241,371)
..controls (198,371) and (159,342) .. (154,322)
..controls (153,318) and (153,314) .. (153,309)
..controls (153,303) and (153, 69) .. (155, 62)
..controls (163, 19) and (230, 51) .. (230, 15)
..controls (230,  6) and (228, -6) .. (219, -6)
..controls (216, -6) and (176,  0) .. (127,  0)
..controls (76 ,  0) and ( 36, -6) .. ( 33, -6)
..controls (21 , -6) and ( 21,  5) .. ( 21, 14)
..controls (21 , 31) and ( 30, 30) .. ( 58, 36)
..controls (81 , 40) and ( 81, 56) .. ( 82, 70)
..controls (85 ,161) and ( 87,253) .. ( 87,345)
-- (87,349)
..controls (87 ,430) and ( 84,588) .. ( 83,594)
..controls (78 ,619) and ( 12,610) .. ( 12,636)
..controls (12 ,648) and ( 26,654) .. ( 28,655)
..controls (135,717) and (136,719) .. (143,719)
-- (144,719)
..controls (150,719) and (159,716) .. (159,700)
-- (158,392)
..controls (158,386) and (161,385) .. (163,385)
..controls (169,385) and (213,422) .. (281,422)
..controls (347,422) and (392,384) .. (415,331)
..controls (435,284) and (440,253) .. (444, 66)
..controls (444, 38) and (456, 37) .. (481, 34)
..controls (489, 33) and (498, 30) .. (498, 16)
..controls (498, -2) and (493, -6) .. (485, -6)
..controls (482, -6) and (444,  0) .. (394,  0)
..controls (346,  0) and (307, -6) .. (304, -6)
..controls (295, -6) and (293,  1) .. cycle;

endfig;

end

closed as unclear what you're asking by Thruston, Stefan Pinnow, Schweinebacke, Mico, TeXnician Aug 14 '17 at 14:40

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What's the actual question here? – Thruston Dec 5 '16 at 9:28
  • Well, is there any way to do what I want? – Kevin Keith Dec 5 '16 at 19:13

Browse other questions tagged or ask your own question.