314 {
315
316 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
317 ((ObjectInterface *) clazz->interface)->hash =
hash;
318 ((ObjectInterface *) clazz->interface)->isEqual =
isEqual;
319
320 ((FontInterface *) clazz->interface)->cachedFont =
cachedFont;
322 ((FontInterface *) clazz->interface)->clearCache =
clearCache;
323 ((FontInterface *) clazz->interface)->defaultFont =
defaultFont;
327 ((FontInterface *) clazz->interface)->sizeCharacters =
sizeCharacters;
328
329 const bool init = TTF_Init();
332
333 _cache = $$(Dictionary, dictionary);
335
336 _fonts = $$(Array, array);
338}
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)