[metapost] Problem with generating EPS from MetaFont source

luigi scarso luigi.scarso at gmail.com
Sat Dec 4 02:12:41 CET 2010


On Sat, Dec 4, 2010 at 12:02 AM, Dan Luecking <luecking at uark.edu> wrote:
>
> [Forgot to copy the list]
>
> Michael Ummels <michael.ummels at rwth-aachen.de> wrote:
>
>>
>> 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.
>>
>> 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.
>>
>> Interestingly, the problem does not occur when using pencircle
>> instead of
>> pensquare.
>
> Metapost has longstanding bugs in the handling of polygonal pens.
> It tries to calculate the path of the outermost corner, which can switch
> from one corner to another along a curve. Unfortunately, this is a rather
> unstable mathematical problem and metapost frequently gets it wrong.
> Sometimes an infinitessimal rotation of the pen causes it to come out
> right.
>
> You would be advised to calculate these paths yourself and  fill the
> resulting outline.
>
> I believe Taco may know more about these issues.
>
> Taco: I have wondered a lot about metapost's problems with polygonal
> pens. If someone could point out the code that handles it (and perhaps
> a description of the algorithm), I would like to take a whack at figuring
> out at least where and/or why it goes wrong.
The example doesn't compile with
MetaPost, version 1.503 (kpathsea version 6.0.0)
Log says
reloading the plain base, version 0.99: preliminaries,
 basic constants and mathematical macros,
 macros for converting units,
 macros and tables for various modes of operation,
 macros for drawing and filling,
 macros for proof labels and rules,
 macros for character and font administration,
and a few last-minute items.)
! Attempt to close the bottom level file!.
l.584 numeric mode,mag;
                            % but leave mode and mag undefined

It's ok with
This is MetaPost, version 1.211 (TeX Live 2010) (kpathsea version 6.0.0)

-- 
luigi



More information about the metapost mailing list