Moai SDK  1.5 revision 1 (MoaiEdition)
MOAIGlyphCache Class Reference
Inheritance diagram for MOAIGlyphCache:
MOAIGlyphCacheBase

List of all members.


Detailed Description

This is the default implementation of a dynamic glyph cache. Right now it can only grow but support for reference counting glyphs and garbage collection will be added later.

The current implementation is set up in anticipation of garbage collection. If you use MOAIFont's getImage () to inspect the work of this cache you'll see that it is not as efficient in terms of texture use as it could be - glyphs are grouped by size, all glyphs for a given face size are given the same height and layout is orientated around rows. All of this will make it much easier to replace individual glyph slots as the set of glyphs that needs to be in memory changes. That said, we may offer an alternative dynamic cache implementation that attempts a more compact use of texture space, the tradeoff being that there won't be any garbage collection.

This implementation of the dynamic glyph cache does not implement setImage ().

Of course, you can also derive your own implementation from MOAIGlyphCacheBase.