1 #ifndef FT2_PRIVATE_H__
2 #define FT2_PRIVATE_H__
4 // anything should work, but I recommend multiples of 8
5 // since the texture size should be a power of 2
6 #define FONT_CHARS_PER_LINE 16
7 #define FONT_CHAR_LINES 16
8 #define FONT_CHARS_PER_MAP (FONT_CHARS_PER_LINE * FONT_CHAR_LINES)
10 typedef struct glyph_slot_s
13 // we keep the quad coords here only currently
14 // if you need other info, make Font_LoadMapForIndex fill it into this slot
15 float txmin; // texture coordinate in [0,1]
30 struct ft2_font_map_s *next;
32 // the actual size used in the freetype code
33 // by convention, the requested size is the height of the font's bounding box.
39 glyph_slot_t glyphs[FONT_CHARS_PER_MAP];
41 // contains the kerning information for the first 256 characters
42 // for the other characters, we will lookup the kerning information
43 ft2_kerning_t kerning;
44 // safes us the trouble of calculating these over and over again
47 // the width_of for the image-font, pixel-snapped for this size
51 struct ft2_attachment_s
53 const unsigned char *data;
57 //qboolean Font_LoadMapForIndex(ft2_font_t *font, Uchar _ch, ft2_font_map_t **outmap);
58 qboolean Font_LoadMapForIndex(ft2_font_t *font, int map_index, Uchar _ch, ft2_font_map_t **outmap);
60 void font_start(void);
61 void font_shutdown(void);
62 void font_newmap(void);
64 #endif // FT2_PRIVATE_H__