![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
#include "quakedef.h"
#include "ft2.h"
#include "ft2_defs.h"
#include "ft2_fontdefs.h"
#include "image.h"
Go to the source code of this file.
Data Structures | |
struct | font_postprocess_t |
struct | fontfilecache_t |
Macros | |
#define | bytes_per_pixel 4 |
#define | bytes_per_pixel 4 |
#define | calc_data_arguments(w, h) |
#define | fix_glyph_coords_tier1(glyph, order) |
#define | fix_glyph_coords_tier2(glyph, order) |
#define | M FONT_CHARS_PER_LINE |
#define | MAX_FONTFILES 8 |
#define | N FONT_CHAR_LINES |
#define | POSTPROCESS_MAXRADIUS 8 |
Functions | |
static void | alert_legacy_font_api (const char *name) |
ft2_font_t * | Font_Alloc (void) |
static qbool | Font_Attach (ft2_font_t *font, ft2_attachment_t *attachment) |
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 _fsize, float *outw, float *outh) |
void | Font_Init (void) |
static qbool | Font_LoadFile (const char *name, int _face, ft2_settings_t *settings, ft2_font_t *font) |
qbool | Font_LoadFont (const char *name, dp_font_t *dpfnt) |
static qbool | Font_LoadMap (ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _ch, ft2_font_map_t **outmap, int *outmapch, qbool incmap_ok) |
qbool | Font_LoadMapForIndex (ft2_font_t *font, int map_index, Uchar ch, ft2_font_map_t **outmap) |
static qbool | Font_LoadSize (ft2_font_t *font, float size, qbool check_only) |
ft2_font_map_t * | Font_MapForIndex (ft2_font_t *font, int index) |
void | font_newmap (void) |
qbool | Font_OpenLibrary (void) |
static void | Font_Postprocess (ft2_font_t *fnt, unsigned char *imagedata, int pitch, int bpp, int w, int h, int *pad_l, int *pad_r, int *pad_t, int *pad_b) |
static void | Font_Postprocess_Update (ft2_font_t *fnt, int bpp, int w, int h) |
static float | Font_SearchSize (ft2_font_t *font, FT_Face fontface, float size) |
static qbool | Font_SetSize (ft2_font_t *font, float w, float h) |
void | font_shutdown (void) |
float | Font_SnapTo (float val, float snapwidth) |
void | font_start (void) |
void | Font_UnloadFont (ft2_font_t *font) |
float | Font_VirtualToRealSize (float sz) |
static void | fontfilecache_Free (const unsigned char *buf) |
static void | fontfilecache_FreeAll (void) |
static const unsigned char * | fontfilecache_LoadFile (const char *path, qbool quiet, fs_offset_t *filesizepointer) |
ft2_font_map_t * | FontMap_FindForChar (ft2_font_map_t *start, Uchar ch) |
static qbool | get_char_from_incmap (ft2_font_map_t *map, Uchar ch, ft2_font_map_t **outmap, int *outmapch) |
static void | incmap_post_process (font_incmap_t *incmap, Uchar ch, unsigned char *data, ft2_font_map_t **outmap, int *outmapch) |
static void | merge_single_map (ft2_font_map_t *targetmap, int targetindex, ft2_font_map_t *sourcemap, int sourceindex) |
static qbool | should_use_incmap (Uchar ch) |
static void | transform_glyph_coords (glyph_slot_t *glyph, float shiftx, float shifty, float scalex, float scaley) |
static void | UnloadMapChain (ft2_font_map_t *map) |
static void | update_pic_for_fontmap (ft2_font_map_t *fontmap, const char *identifier, int width, int height, unsigned char *data) |
Variables | |
cvar_t | developer_font = {CF_CLIENT | CF_ARCHIVE, "developer_font", "0", "prints debug messages about fonts"} |
static FT_Library | font_ft2lib = NULL |
FreeType library handle. | |
static mempool_t * | font_mempool = NULL |
Memory pool for fonts. | |
static fontfilecache_t | fontfiles [MAX_FONTFILES] |
static dllhandle_t | ft2_dll = NULL |
Handle for FreeType2 DLL. | |
static dllfunction_t | ft2funcs [] |
static int | img_fontmap [256] |
static qbool | legacy_font_loading_api_alerted = false |
static font_postprocess_t | pp |
(* | qFT_Attach_Stream )(FT_Face face, FT_Open_Args *parameters) |
(* | qFT_Done_Face )(FT_Face face) |
(* | qFT_Done_FreeType )(FT_Library library) |
(* | qFT_Get_Char_Index )(FT_Face face, FT_ULong charcode) |
(* | qFT_Get_Kerning )(FT_Face face, FT_UInt left_glyph, FT_UInt right_glyph, FT_UInt kern_mode, FT_Vector *akerning) |
(* | qFT_Init_FreeType )(FT_Library *alibrary) |
(* | qFT_Load_Char )(FT_Face face, FT_ULong char_code, FT_Int32 load_flags) |
(* | qFT_Load_Glyph )(FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags) |
(* | qFT_New_Memory_Face )(FT_Library library, const FT_Byte *file_base, FT_Long file_size, FT_Long face_index, FT_Face *aface) |
(* | qFT_Render_Glyph )(FT_GlyphSlot slot, FT_Render_Mode render_mode) |
(* | qFT_Request_Size )(FT_Face face, FT_Size_Request req) |
(* | qFT_Select_Size )(FT_Face face, FT_Int strike_index) |
(* | qFT_Set_Char_Size )(FT_Face face, FT_F26Dot6 char_width, FT_F26Dot6 char_height, FT_UInt horz_resolution, FT_UInt vert_resolution) |
(* | qFT_Set_Pixel_Sizes )(FT_Face face, FT_UInt pixel_width, FT_UInt pixel_height) |
cvar_t | r_font_compress = {CF_CLIENT | CF_ARCHIVE, "r_font_compress", "0", "use texture compression on font textures to save video memory"} |
cvar_t | r_font_disable_freetype = {CF_CLIENT | CF_ARCHIVE, "r_font_disable_freetype", "0", "disable freetype support for fonts entirely"} |
cvar_t | r_font_disable_incmaps = {CF_CLIENT | CF_ARCHIVE, "r_font_disable_incmaps", "0", "always to load a full glyph map for individual unmapped character, even when it will mean extreme resources waste"} |
cvar_t | r_font_diskcache = {CF_CLIENT | CF_ARCHIVE, "r_font_diskcache", "0", "[deprecated, not effective] save font textures to disk for future loading rather than generating them every time"} |
cvar_t | r_font_kerning = {CF_CLIENT | CF_ARCHIVE, "r_font_kerning", "1", "Use kerning if available"} |
cvar_t | r_font_nonpoweroftwo = {CF_CLIENT | CF_ARCHIVE, "r_font_nonpoweroftwo", "1", "use nonpoweroftwo textures for font (saves memory, potentially slower)"} |
cvar_t | r_font_size_snapping = {CF_CLIENT | CF_ARCHIVE, "r_font_size_snapping", "1", "stick to good looking font sizes whenever possible - bad when the mod doesn't support it!"} |
static const Uchar | unicode_bigblocks [] |
#define bytes_per_pixel 4 |
Referenced by Font_LoadMap().
#define bytes_per_pixel 4 |
#define calc_data_arguments | ( | w, | |
h ) |
Definition at line 1276 of file ft2.c.
Referenced by incmap_post_process().
#define fix_glyph_coords_tier1 | ( | glyph, | |
order ) |
Definition at line 1266 of file ft2.c.
Referenced by incmap_post_process().
#define fix_glyph_coords_tier2 | ( | glyph, | |
order ) |
Definition at line 1267 of file ft2.c.
Referenced by incmap_post_process().
#define M FONT_CHARS_PER_LINE |
Referenced by copy64(), incmap_post_process(), mdfour64(), mdfour_tail(), and mdfour_update().
#define MAX_FONTFILES 8 |
Definition at line 267 of file ft2.c.
Referenced by fontfilecache_Free(), fontfilecache_FreeAll(), and fontfilecache_LoadFile().
#define N FONT_CHAR_LINES |
Referenced by incmap_post_process().
#define POSTPROCESS_MAXRADIUS 8 |
Definition at line 246 of file ft2.c.
Referenced by Font_Postprocess(), and Font_Postprocess_Update().
|
inlinestatic |
Definition at line 1889 of file ft2.c.
References Con_DPrintf(), CON_WARN, legacy_font_loading_api_alerted, and name.
Referenced by Font_LoadMapForIndex(), and FontMap_FindForChar().
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().
|
static |
Definition at line 478 of file ft2.c.
References attachment, ft2_font_t::attachmentcount, ft2_font_t::attachments, font_mempool, Mem_Alloc, Mem_Free, and NULL.
Referenced by Font_LoadFile().
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 | _fsize, | ||
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.
References Cvar_RegisterVariable(), developer_font, Font_OpenLibrary(), r_font_compress, r_font_disable_freetype, r_font_disable_incmaps, r_font_diskcache, r_font_kerning, r_font_nonpoweroftwo, and r_font_size_snapping.
Referenced by Render_Init().
|
static |
Definition at line 628 of file ft2.c.
References ft2_font_t::attachmentcount, ft2_font_t::attachments, Con_DPrintf(), CON_ERROR, Con_Printf(), CON_WARN, data, ft2_font_t::data, dp_strlcpy, ft2_font_t::face, FT_Open_Args::flags, Font_Attach(), font_ft2lib, Font_OpenLibrary(), Font_UnloadFont(), fontfilecache_LoadFile(), FT_FACE_FLAG_KERNING, FT_OPEN_MEMORY, ft2_font_t::has_kerning, i, ft2_font_t::image_font, cvar_t::integer, MAX_QPATH, FT_Open_Args::memory_base, FT_Open_Args::memory_size, ft2_font_t::name, name, qFT_Attach_Stream, qFT_New_Memory_Face, r_font_disable_freetype, ft2_font_t::settings, and strlen().
Referenced by Font_LoadFont().
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().
|
static |
Definition at line 1385 of file ft2.c.
References glyph_slot_t::advance_x, glyph_slot_t::advance_y, ft2_settings_t::antialias, FT_Bitmap::buffer, bytes_per_pixel, Con_DPrint(), Con_DPrintf(), CON_ERROR, Con_Printf(), CON_WARN, data, developer_font, dpsnprintf(), Draw_IsPicLoaded(), ft2_font_t::face, FONT_CHAR_LINES, FONT_CHARS_PER_LINE, FONT_CHARS_PER_MAP, font_mempool, Font_Postprocess(), Font_SearchSize(), Font_SetSize(), Font_SnapTo(), FT_LOAD_FORCE_AUTOHINT, FT_LOAD_MONOCHROME, FT_LOAD_NO_AUTOHINT, FT_LOAD_NO_HINTING, FT_LOAD_RENDER, FT_LOAD_TARGET_LIGHT, FT_LOAD_TARGET_MONO, FT_LOAD_TARGET_NORMAL, FT_PIXEL_MODE_GRAY, FT_PIXEL_MODE_GRAY2, FT_PIXEL_MODE_GRAY4, FT_PIXEL_MODE_MONO, height, ft2_settings_t::hinting, glyph_slot_t::image, ft2_font_t::image_font, img_fontmap, incmap_post_process(), INCMAP_START, cvar_t::integer, MAX_QPATH, Mem_Alloc, Mem_Free, ft2_font_t::name, ft2_font_t::next, NULL, FT_Bitmap::pitch, FT_Bitmap::pixel_mode, qFT_Get_Char_Index, qFT_Load_Glyph, FT_Bitmap::rows, ft2_font_t::settings, src, glyph_slot_t::txmax, glyph_slot_t::txmin, glyph_slot_t::tymax, glyph_slot_t::tymin, update_pic_for_fontmap(), glyph_slot_t::vxmax, glyph_slot_t::vxmin, glyph_slot_t::vymax, glyph_slot_t::vymin, w, FT_Bitmap::width, width, x, and y.
Referenced by Font_GetMapForChar(), Font_LoadMapForIndex(), and Font_LoadSize().
qbool Font_LoadMapForIndex | ( | ft2_font_t * | font, |
int | map_index, | ||
Uchar | ch, | ||
ft2_font_map_t ** | outmap ) |
Definition at line 1899 of file ft2.c.
References alert_legacy_font_api(), Font_LoadMap(), ft2_font_t::font_maps, MAX_FONT_SIZES, and NULL.
|
static |
Definition at line 911 of file ft2.c.
References CeilPowerOf2(), CON_ERROR, Con_Printf(), ft2_font_t::face, Font_LoadMap(), ft2_font_t::font_maps, font_mempool, Font_Postprocess(), Font_SearchSize(), Font_SnapTo(), Font_UnloadFont(), FT_KERNING_DEFAULT, ft2_font_t::has_kerning, ft2_font_t::image_font, cvar_t::integer, max, MAX_FONT_SIZES, Mem_Alloc, ft2_font_t::name, ft2_font_t::next, NULL, qFT_Get_Char_Index, qFT_Get_Kerning, r, r_font_nonpoweroftwo, size, FT_Vector::x, and FT_Vector::y.
Referenced by Font_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().
|
static |
Definition at line 787 of file ft2.c.
References font_postprocess_t::blur, font_postprocess_t::blurpadding_lt, font_postprocess_t::blurpadding_rb, bound, font_postprocess_t::buf, font_postprocess_t::buf2, font_postprocess_t::bufheight, font_postprocess_t::bufpitch, font_postprocess_t::bufwidth, font_postprocess_t::circlematrix, Font_Postprocess_Update(), font_postprocess_t::gausstable, i, int(), max, min, font_postprocess_t::outline, font_postprocess_t::outlinepadding_b, font_postprocess_t::outlinepadding_l, font_postprocess_t::outlinepadding_r, font_postprocess_t::outlinepadding_t, font_postprocess_t::padding_b, font_postprocess_t::padding_l, font_postprocess_t::padding_r, font_postprocess_t::padding_t, POSTPROCESS_MAXRADIUS, pp, font_postprocess_t::shadowx, font_postprocess_t::shadowy, font_postprocess_t::shadowz, w, x, x1, x2, y, and y2.
Referenced by Font_LoadMap(), and Font_LoadSize().
|
static |
Definition at line 733 of file ft2.c.
References font_postprocess_t::blur, ft2_settings_t::blur, font_postprocess_t::blurpadding_lt, font_postprocess_t::blurpadding_rb, bound, font_postprocess_t::buf, font_postprocess_t::buf2, font_postprocess_t::bufheight, font_postprocess_t::bufpitch, font_postprocess_t::bufsize, font_postprocess_t::bufwidth, ceil(), font_postprocess_t::circlematrix, floor(), font_mempool, font_postprocess_t::gausstable, Mem_Alloc, Mem_Free, font_postprocess_t::outline, ft2_settings_t::outline, font_postprocess_t::outlinepadding_b, font_postprocess_t::outlinepadding_l, font_postprocess_t::outlinepadding_r, font_postprocess_t::outlinepadding_t, font_postprocess_t::padding_b, font_postprocess_t::padding_l, font_postprocess_t::padding_r, font_postprocess_t::padding_t, POSTPROCESS_MAXRADIUS, pow(), pp, ft2_font_t::settings, font_postprocess_t::shadowx, ft2_settings_t::shadowx, font_postprocess_t::shadowy, ft2_settings_t::shadowy, font_postprocess_t::shadowz, ft2_settings_t::shadowz, sqrt(), w, x, and y.
Referenced by Font_Postprocess().
|
static |
Definition at line 1228 of file ft2.c.
References CON_ERROR, Con_Printf(), Font_SetSize(), ft2_font_t::name, and size.
Referenced by Font_LoadMap(), and Font_LoadSize().
|
static |
Definition at line 1059 of file ft2.c.
References ft2_font_t::currenth, ft2_font_t::currentw, ft2_font_t::face, ft2_font_t::image_font, int(), ft2_font_t::next, qFT_Set_Char_Size, and w.
Referenced by Font_GetKerningForMap(), Font_LoadMap(), and Font_SearchSize().
Definition at line 425 of file ft2.c.
References dp_fonts, dp_fonts_t::f, Font_CloseLibrary(), Font_UnloadFont(), dp_font_t::ft2, i, dp_fonts_t::maxsize, and NULL.
Referenced by gl_draw_shutdown().
Definition at line 514 of file ft2.c.
References floor().
Referenced by Font_GetKerningForMap(), Font_LoadMap(), Font_LoadSize(), and LoadFont().
Definition at line 404 of file ft2.c.
References CON_ERROR, Con_Print(), Font_CloseLibrary(), font_ft2lib, font_mempool, Font_OpenLibrary(), Mem_AllocPool, NULL, and qFT_Init_FreeType.
Referenced by gl_draw_start().
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().
|
static |
Definition at line 301 of file ft2.c.
References buf, fontfilecache_t::buf, fontfiles, i, MAX_FONTFILES, Mem_Free, and NULL.
Referenced by Font_UnloadFont().
Definition at line 320 of file ft2.c.
References buf, fontfilecache_t::buf, fontfiles, i, MAX_FONTFILES, Mem_Free, NULL, and fontfilecache_t::refcount.
Referenced by Font_CloseLibrary().
|
static |
Definition at line 269 of file ft2.c.
References buf, fontfilecache_t::buf, dp_strlcpy, font_mempool, fontfiles, FS_LoadFile(), i, fontfilecache_t::len, MAX_FONTFILES, and fontfilecache_t::refcount.
Referenced by Font_LoadFile().
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.
|
inlinestatic |
Definition at line 1936 of file ft2.c.
References FONT_CHARS_PER_MAP, i, and NULL.
Referenced by Font_GetMapForChar().
|
inlinestatic |
Definition at line 1283 of file ft2.c.
References calc_data_arguments, data, Draw_GetPicName(), fix_glyph_coords_tier1, fix_glyph_coords_tier2, FONT_CHARS_PER_LINE, FONT_CHARS_PER_MAP, font_mempool, height, i, INCMAP_START, index, M, Mem_Alloc, Mem_Free, merge_single_map(), N, NULL, UnloadMapChain(), update_pic_for_fontmap(), width, x, and y.
Referenced by Font_LoadMap().
|
inlinestatic |
Definition at line 1270 of file ft2.c.
Referenced by incmap_post_process().
Definition at line 1922 of file ft2.c.
References i, int(), cvar_t::integer, r_font_disable_incmaps, and unicode_bigblocks.
Referenced by Font_GetMapForChar().
|
inlinestatic |
Definition at line 1259 of file ft2.c.
References glyph_slot_t::txmax, glyph_slot_t::txmin, glyph_slot_t::tymax, and glyph_slot_t::tymin.
|
static |
Definition at line 1150 of file ft2.c.
References FONT_CHAR_LINES, FONT_CHARS_PER_LINE, i, Mem_Free, and NULL.
Referenced by Font_UnloadFont(), and incmap_post_process().
|
inlinestatic |
Definition at line 1251 of file ft2.c.
References data, Draw_NewPic(), height, cvar_t::integer, r_font_compress, TEXF_ALPHA, TEXF_CLAMP, TEXF_COMPRESS, TEXTYPE_RGBA, and width.
Referenced by Font_LoadMap(), and incmap_post_process().
cvar_t developer_font = {CF_CLIENT | CF_ARCHIVE, "developer_font", "0", "prints debug messages about fonts"} |
Definition at line 61 of file ft2.c.
Referenced by FindFont(), Font_Init(), and Font_LoadMap().
|
static |
FreeType library handle.
Definition at line 244 of file ft2.c.
Referenced by Font_CloseLibrary(), Font_LoadFile(), and font_start().
Memory pool for fonts.
Definition at line 241 of file ft2.c.
Referenced by Font_Alloc(), Font_Attach(), Font_CloseLibrary(), Font_LoadMap(), Font_LoadSize(), Font_Postprocess_Update(), font_start(), fontfilecache_LoadFile(), and incmap_post_process().
|
static |
Definition at line 268 of file ft2.c.
Referenced by fontfilecache_Free(), fontfilecache_FreeAll(), and fontfilecache_LoadFile().
|
static |
Handle for FreeType2 DLL.
Definition at line 159 of file ft2.c.
Referenced by Font_Alloc(), Font_CloseLibrary(), Font_OpenLibrary(), and Font_UnloadFont().
|
static |
Definition at line 138 of file ft2.c.
Referenced by Font_OpenLibrary().
|
static |
Definition at line 11 of file ft2.c.
Referenced by Font_LoadMap().
Definition at line 1888 of file ft2.c.
Referenced by alert_legacy_font_api().
|
static |
Definition at line 257 of file ft2.c.
Referenced by Font_CloseLibrary(), Font_Postprocess(), and Font_Postprocess_Update().
(* qFT_Attach_Stream) (FT_Face face, FT_Open_Args *parameters) | ( | FT_Face | face, |
FT_Open_Args * | parameters ) |
Definition at line 63 of file ft2.c.
Referenced by Font_LoadFile().
Definition at line 63 of file ft2.c.
Referenced by Font_UnloadFont().
(* qFT_Done_FreeType) (FT_Library library) | ( | FT_Library | library | ) |
Definition at line 63 of file ft2.c.
Referenced by Font_CloseLibrary().
Definition at line 63 of file ft2.c.
Referenced by Font_GetKerningForMap(), Font_LoadMap(), and Font_LoadSize().
(* qFT_Get_Kerning) (FT_Face face, FT_UInt left_glyph, FT_UInt right_glyph, FT_UInt kern_mode, FT_Vector *akerning) | ( | FT_Face | face, |
FT_UInt | left_glyph, | ||
FT_UInt | right_glyph, | ||
FT_UInt | kern_mode, | ||
FT_Vector * | akerning ) |
Definition at line 63 of file ft2.c.
Referenced by Font_GetKerningForMap(), and Font_LoadSize().
(* qFT_Init_FreeType) (FT_Library *alibrary) | ( | FT_Library * | alibrary | ) |
Definition at line 63 of file ft2.c.
Referenced by font_start().
(* qFT_Load_Glyph) (FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags) | ( | FT_Face | face, |
FT_UInt | glyph_index, | ||
FT_Int32 | load_flags ) |
Definition at line 63 of file ft2.c.
Referenced by Font_LoadMap().
(* qFT_New_Memory_Face) (FT_Library library, const FT_Byte *file_base, FT_Long file_size, FT_Long face_index, FT_Face *aface) | ( | FT_Library | library, |
const FT_Byte * | file_base, | ||
FT_Long | file_size, | ||
FT_Long | face_index, | ||
FT_Face * | aface ) |
Definition at line 63 of file ft2.c.
Referenced by Font_LoadFile().
(* qFT_Render_Glyph) (FT_GlyphSlot slot, FT_Render_Mode render_mode) | ( | FT_GlyphSlot | slot, |
FT_Render_Mode | render_mode ) |
(* qFT_Request_Size) (FT_Face face, FT_Size_Request req) | ( | FT_Face | face, |
FT_Size_Request | req ) |
(* qFT_Set_Char_Size) (FT_Face face, FT_F26Dot6 char_width, FT_F26Dot6 char_height, FT_UInt horz_resolution, FT_UInt vert_resolution) | ( | FT_Face | face, |
FT_F26Dot6 | char_width, | ||
FT_F26Dot6 | char_height, | ||
FT_UInt | horz_resolution, | ||
FT_UInt | vert_resolution ) |
Definition at line 63 of file ft2.c.
Referenced by Font_SetSize().
cvar_t r_font_compress = {CF_CLIENT | CF_ARCHIVE, "r_font_compress", "0", "use texture compression on font textures to save video memory"} |
Definition at line 59 of file ft2.c.
Referenced by Font_Init(), and update_pic_for_fontmap().
cvar_t r_font_disable_freetype = {CF_CLIENT | CF_ARCHIVE, "r_font_disable_freetype", "0", "disable freetype support for fonts entirely"} |
Definition at line 55 of file ft2.c.
Referenced by Font_Alloc(), Font_Init(), Font_LoadFile(), Font_OpenLibrary(), and Font_UnloadFont().
cvar_t r_font_disable_incmaps = {CF_CLIENT | CF_ARCHIVE, "r_font_disable_incmaps", "0", "always to load a full glyph map for individual unmapped character, even when it will mean extreme resources waste"} |
Definition at line 63 of file ft2.c.
Referenced by Font_Init(), and should_use_incmap().
cvar_t r_font_diskcache = {CF_CLIENT | CF_ARCHIVE, "r_font_diskcache", "0", "[deprecated, not effective] save font textures to disk for future loading rather than generating them every time"} |
Definition at line 58 of file ft2.c.
Referenced by Font_Init().
cvar_t r_font_kerning = {CF_CLIENT | CF_ARCHIVE, "r_font_kerning", "1", "Use kerning if available"} |
cvar_t r_font_nonpoweroftwo = {CF_CLIENT | CF_ARCHIVE, "r_font_nonpoweroftwo", "1", "use nonpoweroftwo textures for font (saves memory, potentially slower)"} |
Definition at line 60 of file ft2.c.
Referenced by Font_Init(), and Font_LoadSize().
cvar_t r_font_size_snapping = {CF_CLIENT | CF_ARCHIVE, "r_font_size_snapping", "1", "stick to good looking font sizes whenever possible - bad when the mod doesn't support it!"} |
Definition at line 56 of file ft2.c.
Referenced by Font_IndexForSize(), and Font_Init().
|
static |
Definition at line 41 of file ft2.c.
Referenced by should_use_incmap().