On Sat, Apr 25, 2020 at 9:42 PM Werner LEMBERG <[email protected]> wrote:
> There are two: TrueType and PostScript, which are exactly the
> opposite.  However, all glyphs in a font have the same orientation, so
> this should be easy to handle.
>
> > If I can assume that external outlines go in clockwise order, I
> > could skip left-pointing path elements when creating the upwards
> > skyline, cutting the amount of work in half.
>
> Theoretically, you could use function `FT_Outline_Get_Orientation` to
> reliably get the orientation of an outline with unknown origin.  For
> glyphs of a font this isn't necessary since they follow strict rules.
>
> > Also, is there is way to detect internal curves (eg. the inner curve
> > of the O glyph?).
>
> The 'inner' outline of an 'O' glyph has exactly the opposite direction
> of the outer outline.  In other words, for getting the outermost
> outline(s) of a glyph you can always skip such 'inner' ones.

But you'd have to call FT_Outline_Get_Orientation on the outline,
which sounds like it might be a expensive. Is it cached? Is it
cachable?

-- 
Han-Wen Nienhuys - [email protected] - http://www.xs4all.nl/~hanwen

Reply via email to