[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Extracting approximate outlines from FT ?
From: |
Han-Wen Nienhuys |
Subject: |
Re: Extracting approximate outlines from FT ? |
Date: |
Sun, 26 Apr 2020 07:48:04 +0200 |
On Sat, Apr 25, 2020 at 9:42 PM Werner LEMBERG <address@hidden> 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 - address@hidden - http://www.xs4all.nl/~hanwen
- Extracting approximate outlines from FT ?, Han-Wen Nienhuys, 2020/04/17
- Re: Extracting approximate outlines from FT ?, Werner LEMBERG, 2020/04/25
- Re: Extracting approximate outlines from FT ?,
Han-Wen Nienhuys <=
- Re: Extracting approximate outlines from FT ?, Han-Wen Nienhuys, 2020/04/26
- Re: Extracting approximate outlines from FT ?, Werner LEMBERG, 2020/04/26
- Re: Extracting approximate outlines from FT ?, Han-Wen Nienhuys, 2020/04/26
- Re: Extracting approximate outlines from FT ?, Werner LEMBERG, 2020/04/27