![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
#include "utf8lib.h"
Go to the source code of this file.
Data Structures | |
struct | ft2_font_t |
struct | ft2_kerning_t |
Macros | |
#define | ft2_oldstyle_map ((ft2_font_map_t*)-1) |
Typedefs | |
typedef float | ft2_kernvec[2] |
typedef struct incmap_lookup_cache_s | incmap_lookup_cache_t |
Functions | |
ft2_font_t * | Font_Alloc (void) |
void | Font_CloseLibrary (void) |
qbool | Font_GetKerningForMap (ft2_font_t *font, int map_index, float w, float h, Uchar left, Uchar right, float *outx, float *outy) |
qbool | Font_GetKerningForSize (ft2_font_t *font, float w, float h, Uchar left, Uchar right, float *outx, float *outy) |
qbool | Font_GetMapForChar (ft2_font_t *font, int map_index, Uchar ch, ft2_font_map_t **outmap, int *outmapch) |
Query for or load a font map for a character, with the character's place on it. | |
int | Font_IndexForSize (ft2_font_t *font, float size, float *outw, float *outh) |
void | Font_Init (void) |
qbool | Font_LoadFont (const char *name, dp_font_t *dpfnt) |
ft2_font_map_t * | Font_MapForIndex (ft2_font_t *font, int index) |
qbool | Font_OpenLibrary (void) |
float | Font_SnapTo (float val, float snapwidth) |
void | Font_UnloadFont (ft2_font_t *font) |
float | Font_VirtualToRealSize (float sz) |
ft2_font_map_t * | FontMap_FindForChar (ft2_font_map_t *start, Uchar ch) |
#define ft2_oldstyle_map ((ft2_font_map_t*)-1) |
Definition at line 30 of file ft2.h.
Referenced by DrawQ_String_Scale(), and DrawQ_TextWidth_UntilWidth_TrackColors_Scale().
typedef struct incmap_lookup_cache_s incmap_lookup_cache_t |
ft2_font_t * Font_Alloc | ( | void | ) |
Definition at line 467 of file ft2.c.
References font_mempool, ft2_dll, cvar_t::integer, Mem_Alloc, NULL, and r_font_disable_freetype.
Referenced by Font_LoadFont().
Definition at line 339 of file ft2.c.
References font_postprocess_t::buf, font_ft2lib, font_mempool, fontfilecache_FreeAll(), ft2_dll, Mem_FreePool, NULL, pp, qFT_Done_FreeType, and Sys_FreeLibrary().
Referenced by font_shutdown(), and font_start().
qbool Font_GetKerningForMap | ( | ft2_font_t * | font, |
int | map_index, | ||
float | w, | ||
float | h, | ||
Uchar | left, | ||
Uchar | right, | ||
float * | outx, | ||
float * | outy ) |
Definition at line 1085 of file ft2.c.
References CON_ERROR, Con_Printf(), ft2_font_t::face, ft2_font_t::font_maps, Font_SetSize(), Font_SnapTo(), FT_KERNING_DEFAULT, ft2_font_t::has_kerning, cvar_t::integer, MAX_FONT_SIZES, ft2_font_t::name, qFT_Get_Char_Index, qFT_Get_Kerning, r_font_kerning, right, w, FT_Vector::x, and FT_Vector::y.
Referenced by DrawQ_String_Scale(), DrawQ_TextWidth_UntilWidth_TrackColors_Scale(), and Font_GetKerningForSize().
qbool Font_GetKerningForSize | ( | ft2_font_t * | font, |
float | w, | ||
float | h, | ||
Uchar | left, | ||
Uchar | right, | ||
float * | outx, | ||
float * | outy ) |
Definition at line 1143 of file ft2.c.
References Font_GetKerningForMap(), Font_IndexForSize(), NULL, right, and w.
qbool Font_GetMapForChar | ( | ft2_font_t * | font, |
int | map_index, | ||
Uchar | ch, | ||
ft2_font_map_t ** | outmap, | ||
int * | outmapch ) |
Query for or load a font map for a character, with the character's place on it.
Supports the incremental map mechanism; returning if the operation is done successfully
Definition at line 1971 of file ft2.c.
References FONT_CHARS_PER_MAP, Font_LoadMap(), Font_MapForIndex(), ft2_font_t::font_maps, get_char_from_incmap(), MAX_FONT_SIZES, and should_use_incmap().
Referenced by DrawQ_String_Scale(), and DrawQ_TextWidth_UntilWidth_TrackColors_Scale().
int Font_IndexForSize | ( | ft2_font_t * | font, |
float | size, | ||
float * | outw, | ||
float * | outh ) |
Definition at line 999 of file ft2.c.
References fabs(), ft2_font_t::font_maps, viddef_mode_t::height, MAX_FONT_SIZES, viddef_t::mode, r_font_size_snapping, size, cvar_t::value, value, vid, vid_conheight, vid_conwidth, and viddef_mode_t::width.
Referenced by DrawQ_String_Scale(), DrawQ_TextWidth_UntilWidth_TrackColors_Scale(), and Font_GetKerningForSize().
Definition at line 443 of file ft2.c.
Definition at line 521 of file ft2.c.
References CON_ERROR, Con_Printf(), count, dp_strlcpy, dp_font_t::fallback_faces, dp_font_t::fallbacks, Font_Alloc(), Font_LoadFile(), Font_LoadSize(), Font_UnloadFont(), Font_VirtualToRealSize(), FS_FileExists(), dp_font_t::ft2, ft2_font_t::has_kerning, i, ft2_font_t::image_font, MAX_FONT_FALLBACKS, MAX_FONT_SIZES, Mem_Free, ft2_font_t::name, name, ft2_font_t::next, NULL, dp_font_t::req_face, dp_font_t::req_sizes, dp_font_t::settings, and va().
Referenced by LoadFont().
ft2_font_map_t * Font_MapForIndex | ( | ft2_font_t * | font, |
int | index ) |
Definition at line 1052 of file ft2.c.
References ft2_font_t::font_maps, index, MAX_FONT_SIZES, and NULL.
Referenced by DrawQ_String_Scale(), DrawQ_TextWidth_UntilWidth_TrackColors_Scale(), Font_GetMapForChar(), and LoadFont().
Definition at line 362 of file ft2.c.
References ft2_dll, ft2funcs, cvar_t::integer, NULL, r_font_disable_freetype, and Sys_LoadDependency().
Referenced by Font_Init(), Font_LoadFile(), and font_start().
Definition at line 514 of file ft2.c.
References floor().
Referenced by Font_GetKerningForMap(), Font_LoadMap(), Font_LoadSize(), and LoadFont().
void Font_UnloadFont | ( | ft2_font_t * | font | ) |
Definition at line 1184 of file ft2.c.
References ft2_font_t::attachmentcount, ft2_font_t::attachments, ft2_font_t::data, ft2_font_t::face, ft2_font_t::font_maps, Font_UnloadFont(), fontfilecache_Free(), ft2_dll, i, int(), cvar_t::integer, MAX_FONT_SIZES, Mem_Free, ft2_font_t::next, NULL, qFT_Done_Face, r_font_disable_freetype, and UnloadMapChain().
Referenced by Font_LoadFile(), Font_LoadFont(), Font_LoadSize(), font_shutdown(), Font_UnloadFont(), and LoadFont().
Definition at line 496 of file ft2.c.
References viddef_mode_t::height, int(), viddef_t::mode, cvar_t::value, vid, vid_conheight, and vid_height.
Referenced by Font_LoadFont().
ft2_font_map_t * FontMap_FindForChar | ( | ft2_font_map_t * | start, |
Uchar | ch ) |
Definition at line 1911 of file ft2.c.
References alert_legacy_font_api(), FONT_CHARS_PER_MAP, and NULL.