freetype
[Top][All Lists]
Advanced

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

RE: A couple of issues with freetype2-beta6


From: Elliot Lee
Subject: RE: A couple of issues with freetype2-beta6
Date: Thu, 22 Jun 2000 15:40:53 -0400 (EDT)

On Thu, 22 Jun 2000, Pedriana, Paul wrote:

>    >>I'm not asking for caching, just an API that 
>    >>allows implementing it. If I can specify GlyphSlot 
>    >>to load a Glyph into, that's all I need.
> 
> Since when doesn't the current design allow for caching?

API, not design. AFAICS the best way to implement caching is by having a
bunch of GlyphSlot's around, but I can't do that if there's no way to get
a Glyph into more than one GlyphSlot using the existing API, even if the
design does allow to implement it eventually.

> What I do is create a C++ STL map of glyphs to cached glyph
> information. New entries are loaded on demand and entries can be
> purged via a simple LRU (last recently used) algorithm.  Thus, when a
> string of text needs to be drawn, each character is looked up in the
> set and all the information, including a pre-drawn version of the
> character, is there to simply blit.

I'm already caching glyph sizes - not sure if caching the pre-drawn
bitmaps is a great idea compared to using GlyphSlots, but it's a "duh" I
should have implemented in the meantime.

-- Elliot
The best way to accelerate a Macintosh is at 9.8 meters per second per second.




reply via email to

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