324 {
325
326 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
327 ((ObjectInterface *) clazz->interface)->hash =
hash;
328 ((ObjectInterface *) clazz->interface)->isEqual =
isEqual;
329
330 ((FontInterface *) clazz->interface)->cachedFont =
cachedFont;
332 ((FontInterface *) clazz->interface)->clearCache =
clearCache;
333 ((FontInterface *) clazz->interface)->defaultFont =
defaultFont;
337 ((FontInterface *) clazz->interface)->sizeCharacters =
sizeCharacters;
338
339 const bool init = TTF_Init();
342
343 _cache = $$(Dictionary, dictionary);
345
346 _fonts = $$(Array, array);
348}
static View * init(View *self)
static void sizeCharacters(const Font *self, const char *chars, int *w, int *h)
static SDL_Surface * renderCharacters(const Font *self, const char *chars, SDL_Color color, int wrapWidth)
static void clearCache(void)
static bool isEqual(const Object *self, const Object *other)
static void renderDeviceDidReset(Font *self)
void(* cacheFont)(Data *data, const char *family)
Caches the specified font Data.
void renderCharacters(const Font *self, const char *chars, SDL_Color color, int wrapWidth)
Renders the given characters in this Font.
Font * initWithData(Font *self, Data *data, int size, int index)