X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=ft2_fontdefs.h;h=8cdc9e1d0ceb3ac6240e1a8ef9e16e51fa0a0e36;hp=20726d03a1f76fd23faaa45393aac1230053a6b4;hb=f02aede58fe2b44b1eba101a09bdef4c99222d32;hpb=34ac3e1a25d3b1541a7b32e89c63812b52c3edac diff --git a/ft2_fontdefs.h b/ft2_fontdefs.h index 20726d03..8cdc9e1d 100644 --- a/ft2_fontdefs.h +++ b/ft2_fontdefs.h @@ -9,7 +9,7 @@ typedef struct glyph_slot_s { - qboolean image; + qbool image; // we keep the quad coords here only currently // if you need other info, make Font_LoadMapForIndex fill it into this slot float txmin; // texture coordinate in [0,1] @@ -34,8 +34,8 @@ struct ft2_font_map_s float intSize; int glyphSize; - rtexture_t *texture; - qboolean static_tex; + cachepic_t *pic; + qbool static_tex; glyph_slot_t glyphs[FONT_CHARS_PER_MAP]; // contains the kerning information for the first 256 characters @@ -43,16 +43,19 @@ struct ft2_font_map_s ft2_kerning_t kerning; // safes us the trouble of calculating these over and over again double sfx, sfy; + + // the width_of for the image-font, pixel-snapped for this size + float width_of[256]; }; struct ft2_attachment_s { - unsigned char *data; + const unsigned char *data; fs_offset_t size; }; -//qboolean Font_LoadMapForIndex(ft2_font_t *font, Uchar _ch, ft2_font_map_t **outmap); -qboolean Font_LoadMapForIndex(ft2_font_t *font, int map_index, Uchar _ch, ft2_font_map_t **outmap); +//qbool Font_LoadMapForIndex(ft2_font_t *font, Uchar _ch, ft2_font_map_t **outmap); +qbool Font_LoadMapForIndex(ft2_font_t *font, int map_index, Uchar _ch, ft2_font_map_t **outmap); void font_start(void); void font_shutdown(void);