[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Decomposing complicated glyphs
From: |
Werner LEMBERG |
Subject: |
Re: [ft] Decomposing complicated glyphs |
Date: |
Sat, 03 Apr 2010 21:24:12 +0200 (CEST) |
> In this case, the glyphs/symbols are composed of an arbitrary number
> of outer polygons, each of which contains an arbitrary number of
> islands. When I call FT_Outline_Decompose(), it triggers a whole
> sequence of calls to my moveTo/lineTo callbacks, but it is unclear
> to me how I'm supposed to know/distinguish between a 'move' to start
> an island verses a 'move' to start a new outer boundary. [ And, I
> am going to need this information in order to get the polygons/holes
> filled correctly, re: winding/even-odd rules, etc ]
The contours stored within a TrueType font don't contain a flag which
indicates the orientation.
> Am I required to collect up the points and analyze them to try and
> resolve the ambiguity myself?
I think so. It's rather easy to find out the direction of a contour –
I assume you know how to do that efficiently.
> Or does FT guarantee to pass them to me in some sort of controlled
> order?
No. It simply walks over the contours sequentially.
Werner