<div>Hi guys,</div><div><br></div>I am trying to use MetaPost to generate EPS files for each character in a MetaFont as described in Appendix B of the MetaPost manual. However, some strokes do not come out correctly or are missing at all in the resulting EPS files. I would be glad if somebody could tell me what is going wrong.<div>
<br></div><div>To replicate my results, run "mpost '&mfplain \mode:=localfont; mag=100.375; input test'" on the file test.mf, which is given below. In the resulting EPS files test.2 and test.3, strokes are missing/incorrect, whereas test.0 and test.1 are fine.</div>
<div><br></div><div>Interestingly, the problem does not occur when using pencircle instead of pensquare.</div><div><br></div><div>Any ideas?</div><div><br></div><div>Michael</div>
<div><br></div><div><br></div><div>And here is the contents of test.mf:</div><div><br></div><div><div>font_size := 10pt#;</div><div>mode_setup;</div><div>u# := 0.6pt#;</div><div>side_bearing# := u#;</div>
<div>equal_spread# := 1.93pt#;</div><div>line_thickness# := 0.65pt#;</div><div>rule_thickness# := 0.58pt#;</div><div>arrow_diag_len# := 9u#;</div><div>arrow_spread# := 1.6equal_spread#;</div><div><br></div><div>define_pixels(u);</div>
<div>define_whole_pixels(equal_spread, arrow_horiz_len, arrow_vert_len, arrow_diag_len, arrow_spread, line_thickness, rule_thickness, side_bearing);</div><div><br></div><div>current_char := -1;</div><div>for alpha = 45, 135, 225, 315:</div>
<div> current_char := current_char + 1;</div><div><br></div><div> beginchar(current_char, arrow_diag_len# + 2side_bearing#, arrow_diag_len#, 0);</div><div> pair centre, head, foot;</div><div> centre := (w/2, (h-d)/2);</div>
<div> head := centre + (arrow_diag_len - line_thickness)/2 * dir alpha;</div><div> foot := centre - (arrow_diag_len - line_thickness)/2 * dir alpha;</div><div><br></div><div> pickup pensquare scaled line_thickness rotated alpha;</div>
<div> draw foot -- head;</div><div> draw (foot - arrow_spread * dir (alpha + 90)) --</div><div> (foot + arrow_spread * dir (alpha + 90));</div><div> endchar;</div><div>endfor;</div><div>bye;</div></div><div>
<br></div>