1 #ifndef __blip_FontManager_hpp 2 #define __blip_FontManager_hpp 4 #include <commonc++/DynamicCache.h++> 5 #include <commonc++/String.h++> 10 struct FT_LibraryRec_;
39 FontManager(uint_t fontCacheSize = 4, uint_t glyphCacheSize = 96);
56 void loadFont(ccxx::DataReader* reader,
int size,
int index = 0);
66 const Font*
lookupFont(
const ccxx::String& name,
int size,
int style = 0)
71 FT_LibraryRec_* _freetype;
75 FontKey(
const ccxx::String& name,
int style,
int size)
76 : name(name), style(style), size(size)
83 bool operator<(
const FontKey& other)
const;
86 mutable ccxx::DynamicCache<FontKey, Font> _cache;
87 uint_t _glyphCacheSize;
94 #endif // __blip_FontManager_hpp void loadFont(ccxx::DataReader *reader, int size, int index=0)
Load a font from a DataReader.
Definition: FontManager.cpp:105
FontManager(uint_t fontCacheSize=4, uint_t glyphCacheSize=96)
Construct a new FontManager with the given cache sizes.
Definition: FontManager.cpp:82
A class for loading and caching TrueType fonts.
Definition: FontManager.hpp:25
A TrueType font.
Definition: Font.hpp:74
WAV file format details at: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/.
Definition: AccelerometerSensorEvent.cpp:3
An abstract base class for all "native" (C++) Android activities.
Definition: NativeActivity.hpp:71
~FontManager()
Destructor.
Definition: FontManager.cpp:97
CCXX_FWD_DECL(DataReader)
const Font * lookupFont(const ccxx::String &name, int size, int style=0) const
Look up a font previously loaded with loadFont().
Definition: FontManager.cpp:147