![]() |
MHEG5
22.11.0
|
Font file handling with the Freetype. More...
#include "glue_assert.h"
#include "glue_memory.h"
#include "glue_debug.h"
#include "mh5profile.h"
#include "mh5support.h"
#include "mg_ctxt.h"
#include "mg_drawtext.h"
#include "mg_fontapi.h"
#include "mg_font.h"
#include "tt7268m_751nz.inl"
Macros | |
#define | FONTS_CACHE_MAX 0x00020000 |
#define | MAX_FONT_OBJECTS 16 |
Functions | |
BOOLEAN | MG_FontInit (BOOLEAN isHD) |
Initialise freetype library and load "built-in" font. More... | |
void | MG_SetMaxFonts (U16BIT max) |
Set Max allowable fonts for profile. More... | |
void | MG_FontExit (void) |
Free all data associated with built-in font and terminate freetype library. More... | |
S16BIT | MG_FontLoadFile (const U8BIT *data, U32BIT length) |
Load font data file into memory for freetype. More... | |
void | MG_FontFreeFile (S16BIT font_index) |
free memory associated with file More... | |
S_FontDetails * | MG_GetFontPtr (S16BIT font_index) |
Get Pointer to Font. More... | |
void | MG_ReleaseFontPtr (S_FontDetails *fp) |
H_FontSize | MG_AllocateFont (S16BIT fnt_index, U8BIT fnt_size, U8BIT fnt_style) |
Allocate font of particular size from font file. More... | |
void | MG_ReleaseFont (H_FontSize f_sz) |
Allocate font of particular size from font file. More... | |
S_FontDetails * | MG_FindFont (H_FontSize f_sz) |
Get font from size. More... | |
void | MG_GetFontMetrics (H_FontSize f_sz, S_FontMetrics *pMetrics) |
Get font Metrics. More... | |
S_FontSize * | MG_GetFontSize (U16BIT fnt_index, U8BIT fnt_size, U8BIT fnt_style) |
void | MG_CheckCache (S_FontSize *f_szdata) |
Variables | |
E_HDMode | mg_hd_mode = NORMAL_SD |
Font file handling with the Freetype.
H_FontSize MG_AllocateFont | ( | S16BIT | fnt_index, |
U8BIT | fnt_size, | ||
U8BIT | fnt_style | ||
) |
Allocate font of particular size from font file.
font_index | index into MG's font array - from MG_FontLoadFile() |
font_size | size in points |
void MG_CheckCache | ( | S_FontSize * | f_szdata | ) |
. |
S_FontDetails* MG_FindFont | ( | H_FontSize | f_sz | ) |
Get font from size.
f_sz | Pointer to size data |
void MG_FontExit | ( | void | ) |
Free all data associated with built-in font and terminate freetype library.
n/a |
void MG_FontFreeFile | ( | S16BIT | font_index | ) |
free memory associated with file
font_index | index into MG's font array - from MG_FontLoadFile() |
BOOLEAN MG_FontInit | ( | BOOLEAN | isHD | ) |
Initialise freetype library and load "built-in" font.
isHD | indicate whether supporting MHEG HD extension |
S16BIT MG_FontLoadFile | ( | const U8BIT * | data, |
U32BIT | length | ||
) |
Load font data file into memory for freetype.
data | font file data |
length | length of font file data |
void MG_GetFontMetrics | ( | H_FontSize | f_sz, |
S_FontMetrics * | pMetrics | ||
) |
Get font Metrics.
font_index | index into MG's font array - from MG_FontLoadFile() |
S_FontDetails* MG_GetFontPtr | ( | S16BIT | font_index | ) |
Get Pointer to Font.
font_index | - as returned by MG_LoadFontFile(). |
S_FontSize* MG_GetFontSize | ( | U16BIT | fnt_index, |
U8BIT | fnt_size, | ||
U8BIT | fnt_style | ||
) |
. |
void MG_ReleaseFont | ( | H_FontSize | f_sz | ) |
Allocate font of particular size from font file.
font_index | index into MG's font array - from MG_FontLoadFile() |
font_size | size in points |
void MG_ReleaseFontPtr | ( | S_FontDetails * | fp | ) |
. |
void MG_SetMaxFonts | ( | U16BIT | max | ) |
Set Max allowable fonts for profile.
n/a |