[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft] Decomposing complicated glyphs
From: |
Ian Britten |
Subject: |
[ft] Decomposing complicated glyphs |
Date: |
Thu, 01 Apr 2010 15:04:19 -0300 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20100301) |
Hi all,
I've got some TTF data that I'm trying to extract the outlines of
(Technically they're symbols, not glyphs, but that's not really
important).
To do this, I'm using FT_Outline_Decompose, which I have successfully
used in other cases. However, with this (non-trivial) data, I'm a
bit stumped about how to best proceed.
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 ]
Obviously, if I was rasterizing the glyph, this wouldn't be a
problem. However, I need the vector outlines in this case...
Am I required to collect up the points and analyze them to try and
resolve the ambiguity myself? Or does FT guarantee to pass them
to me in some sort of controlled order? Or is there some other
info lurking somewhere that I haven't seen?
Many thanks for any info/pointers/etc!
Ian
- [ft] Decomposing complicated glyphs,
Ian Britten <=