freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] FT_Get_Advance() docs


From: Alexei Podtelezhnikov
Subject: Re: [ft-devel] FT_Get_Advance() docs
Date: Wed, 30 Nov 2011 11:50:02 -0500

The problem that your description starts with long cumbersome condition.
Start description with what the flag actually does:

FT_ADVANCE_FLAG_FAST_ONLY:

 . Enable quick retrieval of advance in the special cases of
   - unhinted (FT_LOAD_NO_HINTING),
   - lightly hinted (FT_RENDER_MODE_LIGHT),
   - unscaled (FT_LOAD_NO_SCALE),
   - or bitmapped glyphs.

   Depending on these load flags, you get either advance values in
   FUnits (the sentence about `default' in the description of
   FT_Get_Advance is rather unfortunate) or scaled values which are
   then identical to the glyph->linear{Hori,Vert}Advance values.
   Also

 . If the above conditions aren't met, FT_Load_Glyph is called, and
   you get glyph->advance.{x,y} values. Check for return errors to
   ensure proper return values.





On Wed, Nov 30, 2011 at 9:30 AM, Werner LEMBERG <address@hidden> wrote:

> The behaviour depends on `load_flags' and on
> FT_ADVANCE_FLAG_FAST_ONLY:
>
>  . If a glyph is unhinted (FT_LOAD_NO_HINTING), or unscaled
>    (FT_LOAD_NO_SCALE), or bitmapped, or if the light-hinted rendering
>    mode is active (FT_RENDER_MODE_LIGHT), quick retrieval of advance
>    widths is possible in general.  However, you can only be sure
>    about that if you add FT_ADVANCE_FLAG_FAST_ONLY to `load_flags'
>    and assure that you don't get an error.
>
>    Depending on the load flags, you get either advance values in
>    FUnits (the sentence about `default' in the description of
>    FT_Get_Advance is rather unfortunate) or scaled values which are
>    then identical to the glyph->linear{Hori,Vert}Advance values.
>
>  . If the above conditions aren't met, FT_Load_Glyph is called, and
>    you get glyph->advance.{x,y} values.
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]