freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Font & Glyph caching


From: David Turner
Subject: Re: [Freetype] Font & Glyph caching
Date: Tue, 08 Oct 2002 18:14:31 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2a) Gecko/20020910

Eric Poulsen wrote:
I'm developing an application that only (currently) needs to do metrics
on fonts for layout purposes.  The app will not be rendering any text
directly.

I've written a class to cache fonts (load on demand), then I use FT_Load_Glyph( face, glyph_index, FT_LOAD_DEFAULT ) to load a glyph, and
measure it.

My question: Do I need to glyph caching if I'm not rendering the
glyphs?
Well, you'll need to cache the metrics :-)

Either implement your own cache, or simply use the glyph cache even if
you only use the metrics..

Also, what kind of metrics do you need (expressed in font units, scaled,
hinted, etc...)

It's not possible to get the hinted metrics without loading the whole
glyph. But you could store it in other places for frequent re-use..

Regards,

- David Turner
- The FreeType Project  (www.freetype.org)





reply via email to

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