[metapost] glyph operator and contours order

Laurent Méhats laurent.mehats at gmail.com
Sun Feb 6 16:13:29 CET 2011


Le 06/02/2011 09:22, Taco Hoekwater a écrit :
> 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.

Thanks for these precisions. I'll try my luck and assume that the fonts I
use are proper Type 1 :)

>> 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.

Fine. I don't know these 'even/odd fill rules', thanks for the lead. I'll
have a look to them and try to find a temporary workaround.

Regards,
Laurent Méhats


More information about the metapost mailing list