31#define FONT_BITMAP_FIRST ' '
40#define FONT_BITMAP_COUNT 1024
45#define FONT_BITMAP_LAST (FONT_BITMAP_FIRST + FONT_BITMAP_COUNT)
50#define FONT_BITMAP_COLUMNS 32
55#define FONT_BITMAP_REPLACEMENT '?'
OBJECTIVELYMVC_EXPORT void renderCharactersBitmap(Font *self, const Renderer *renderer, const char *chars, SDL_Color color, int wrapWidth, const SDL_Point *origin, const ImageAtlas *icons)
Implements Font::renderBitmapCharacters.
OBJECTIVELYMVC_EXPORT void deallocBitmap(FontBitmap *bitmap)
Releases the resources held by bitmap. Safe to call on a zeroed FontBitmap.
OBJECTIVELYMVC_EXPORT void renderDeviceWillResetBitmap(Font *self)
Implements Font::renderDeviceWillReset.
OBJECTIVELYMVC_EXPORT bool initBitmap(FontBitmap *bitmap, Font *font)
Bakes FONT_BITMAP_COUNT codepoints of font, from FONT_BITMAP_FIRST, into a glyph sheet,...
OBJECTIVELYMVC_EXPORT void sizeCharactersBitmap(const Font *self, const char *chars, int wrapWidth, const ImageAtlas *icons, int *w, int *h)
Implements Font::sizeBitmapCharacters.
Renderer extends Object with ObjectivelyMVC's UI rendering layer.
static ImageAtlas * icons(Theme *self)
static Font * font(Theme *self, const FontAttributes *attributes, float pixelDensity)
ObjectivelyMVC base types.
#define OBJECTIVELYMVC_EXPORT
A fixed-width Font's glyphs, baked into one sheet, drawn as one quad per glyph.
int bearing
The horizontal offset from the pen to a cell's left edge, in texels.
SDL_Size cellSize
The size of one cell, in texels.
int advance
The pen advance per glyph, in texels.
SDL_Surface * surface
The glyph sheet: a grid of FONT_BITMAP_COLUMNS by FONT_BITMAP_COLUMNS cells of cellSize,...
Packs many Images into one sheet, backed by one Texture.
Renderer extends Object with ObjectivelyMVC's UI rendering layer.