[cairo] cairo_text_path() questions

Carl Worth cworth at cworth.org
Fri Nov 9 11:35:03 PST 2007


On Fri, 9 Nov 2007 19:02:32 +0000 (UTC), "hans at breuer.org" wrote:
> >From: cworth at cworth.org
> >I suspect pilot error on this one.
> I'll try Behdad's suggestions.

Yeah, he did better than I did and predicted a probable cause for the
behavior you're seeing. So his suggestion here should help a lot.

> >But there's nothing to indicate that any particular sub-path is a
> >"hole",
> Again I'll try to follow Behdad's suggestion or do you think it wont
> work?

His approach is a set of heuristics. You do have a fairly constrained set of
inputs, (since you're just taking paths from font files, not arbitrary
paths), but it's still heuristics so I can't say how often it might
fail.

The "holes" will definitely be defined in the opposite direction as
the filled portions. But I have no idea if fonts are generally
consistent about which direction adds and which subtracts, (the fill
algorithm doesn't care, and any given shape can choose either
convention).

So, give it a try and see if it doesn't work. (But also, don't be
surprised if someone comes up with a font file that breaks it.)

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071109/307b0116/attachment.pgp 


More information about the cairo mailing list