313 {
314
315 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
316 ((ObjectInterface *) clazz->interface)->hash =
hash;
317 ((ObjectInterface *) clazz->interface)->isEqual =
isEqual;
318
319 ((FontInterface *) clazz->interface)->cachedFont =
cachedFont;
321 ((FontInterface *) clazz->interface)->clearCache =
clearCache;
322 ((FontInterface *) clazz->interface)->defaultFont =
defaultFont;
326 ((FontInterface *) clazz->interface)->sizeCharacters =
sizeCharacters;
327
328 const int err = TTF_Init();
329 assert(err == 0);
330
331 _cache = $$(MutableDictionary, dictionary);
333
334 _fonts = $$(MutableArray, array);
336}
static _Bool isEqual(const Object *self, const Object *other)
void renderCharacters(const Font *self, const char *chars, SDL_Color color, int wrapWidth)
Renders the given characters in this Font.
void renderDeviceDidReset(Font *self)
This method should be invoked when the render context is invalidated.
void clearCache(void)
Clears the Font cache.
void sizeCharacters(const Font *self, const char *chars, int *w, int *h)