freetype
[Top][All Lists]
Advanced

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

Re: [ft] How to fast get the metrics value of one character


From: Werner LEMBERG
Subject: Re: [ft] How to fast get the metrics value of one character
Date: Wed, 01 Apr 2009 18:37:36 +0200 (CEST)

> I get the idea that the two FT_Load_Char waste a lot of time.
> 
> How can I get the total w and h of the whole strings fast ? <metrics
> value>

It depends.  If you only need the metrics, have a look at
`FT_Get_Advance' and `FT_Get_Advances'.  If you need *exact* w and h,
you *must* render the glyph and cache the result (at least for
TrueType fonts).

BTW, caching is always a good thing.


    Werner




reply via email to

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