[metapost] glyph operator and contours order

Taco Hoekwater taco at elvenkind.com
Sun Feb 6 09:22:17 CET 2011


On 02/05/2011 04:02 PM, Laurent Méhats wrote:
>
> I believe that glyph contours don't intersect each-other, nor
> self-intersect (is that always true ?),

That should be true, otherwise it is not a proper Type 1 font.
But that is not quite the same as 'always': fonts that break this
rule can exist and even though they are not valid, they would
probably still work in everything except drawing programs.
It should be extremely rare, though.

> so my question would be: given two
> non intersecting nor self-intersecting cycles, is there a proper way to
> decide whether one lies inside the other ?

Not easily. I vaguely recall that there was some test code
based on a discussion a year or so ago on the list, but I
cannot find it any more.

The correct solution would be for metapost to allow non-continuous
paths and even/odd fill rules, then change the output of 'glyph'
accordingly. That extension is indeed planned, but not for the next
release.

Best wishes,
Taco



More information about the metapost mailing list