src/fontcache.h
branchcpp_gui
changeset 6298 c30fe89622df
parent 5726 8f399788f6c9
child 9913 e79cd19772dd
equal deleted inserted replaced
6297:4bf29d14edba 6298:c30fe89622df
     8 
     8 
     9 /** Map a SpriteID to the font size and key */
     9 /** Map a SpriteID to the font size and key */
    10 void SetUnicodeGlyph(FontSize size, uint32 key, SpriteID sprite);
    10 void SetUnicodeGlyph(FontSize size, uint32 key, SpriteID sprite);
    11 
    11 
    12 /** Initialize the glyph map */
    12 /** Initialize the glyph map */
    13 void InitializeUnicodeGlyphMap(void);
    13 void InitializeUnicodeGlyphMap();
    14 
    14 
    15 #ifdef WITH_FREETYPE
    15 #ifdef WITH_FREETYPE
    16 
    16 
    17 typedef struct FreeTypeSettings {
    17 struct FreeTypeSettings {
    18 	char small_font[260];
    18 	char small_font[260];
    19 	char medium_font[260];
    19 	char medium_font[260];
    20 	char large_font[260];
    20 	char large_font[260];
    21 	uint small_size;
    21 	uint small_size;
    22 	uint medium_size;
    22 	uint medium_size;
    23 	uint large_size;
    23 	uint large_size;
    24 } FreeTypeSettings;
    24 };
    25 
    25 
    26 extern FreeTypeSettings _freetype;
    26 extern FreeTypeSettings _freetype;
    27 
    27 
    28 void InitFreeType(void);
    28 void InitFreeType();
    29 const struct Sprite *GetGlyph(FontSize size, uint32 key);
    29 const struct Sprite *GetGlyph(FontSize size, uint32 key);
    30 uint GetGlyphWidth(FontSize size, uint32 key);
    30 uint GetGlyphWidth(FontSize size, uint32 key);
    31 
    31 
    32 #else
    32 #else
    33 
    33 
    34 /* Stub for initializiation */
    34 /* Stub for initializiation */
    35 static inline void InitFreeType(void) {}
    35 static inline void InitFreeType() {}
    36 
    36 
    37 /** Get the Sprite for a glyph */
    37 /** Get the Sprite for a glyph */
    38 static inline const Sprite *GetGlyph(FontSize size, uint32 key)
    38 static inline const Sprite *GetGlyph(FontSize size, uint32 key)
    39 {
    39 {
    40 	SpriteID sprite = GetUnicodeGlyph(size, key);
    40 	SpriteID sprite = GetUnicodeGlyph(size, key);