Class for all common FreeType functions.
More...
#include <FreeTypeEnv.h>
|
static void * | FreeType_AllocFunc (FT_Memory memory, long size) |
|
static void | FreeType_CloseStreamFunc (FT_Stream stream) |
|
static void | FreeType_FreeFunc (FT_Memory memory, void *block) |
|
static void * | FreeType_ReAllocFunc (FT_Memory memory, long cur_size, long new_size, void *block) |
|
static unsigned long | FreeType_Stream_IoFunc (FT_Stream stream, unsigned long offset, unsigned char *buffer, unsigned long count) |
|
static eC_Bool | GetDisableKerning () |
|
static eC_Bool | GetFakeBoldAndItalic () |
|
static eC_Int | LoadRequestedFont (const FontResource_t eFontID, FT_Face *pTheLoadedFace, const FT_Library *pFTLibrary) |
|
static void | SetDisableKerning (const eC_Bool bDisableKerning) |
|
static void | SetFakeBoldAndItalic (const eC_Bool bFakeBoldAndItalic) |
|
|
static eC_Bool | ms_bDisableKerning |
| True will disable Kerning. False will enable it (if supported by the given FontWrapper)
|
|
static eC_Bool | ms_bFakeBoldAndItalic |
| True will enable auto-generation of bold/italic effects. False will disable it. (if supported by the given FontWrapper)
|
|
Class for all common FreeType functions.
Used by CFntWrapFreeType and CFntWrapFreeTypeOGL and CFntWrapFreeTypeCAFE
- See also
- CFntWrapFreeType
-
CFntWrapFreeTypeOGL
-
CFntWrapFreeTypeCAFE
◆ FreeType_AllocFunc()
static void * CFreeTypeEnv::FreeType_AllocFunc |
( |
FT_Memory |
memory, |
|
|
long |
size |
|
) |
| |
|
static |
Callback for memory-allocation
- Parameters
-
memory | memory-manager of freetype |
size | size |
- Returns
- memory
◆ FreeType_CloseStreamFunc()
static void CFreeTypeEnv::FreeType_CloseStreamFunc |
( |
FT_Stream |
stream | ) |
|
|
static |
callback function for the freetype cache manager to unload a font.
- Parameters
-
◆ FreeType_FreeFunc()
static void CFreeTypeEnv::FreeType_FreeFunc |
( |
FT_Memory |
memory, |
|
|
void * |
block |
|
) |
| |
|
static |
Callback for memory-free
- Parameters
-
memory | memory-manager of freetype |
block | block |
◆ FreeType_ReAllocFunc()
static void * CFreeTypeEnv::FreeType_ReAllocFunc |
( |
FT_Memory |
memory, |
|
|
long |
cur_size, |
|
|
long |
new_size, |
|
|
void * |
block |
|
) |
| |
|
static |
Callback for memory-reallocation
- Parameters
-
memory | memory-manager of freetype |
cur_size | current size of memory-block |
new_size | new size of memory-block |
block | block |
- Returns
- memory
◆ FreeType_Stream_IoFunc()
static unsigned long CFreeTypeEnv::FreeType_Stream_IoFunc |
( |
FT_Stream |
stream, |
|
|
unsigned long |
offset, |
|
|
unsigned char * |
buffer, |
|
|
unsigned long |
count |
|
) |
| |
|
static |
Callback function used by freetype to read the font files (for use with eC_File).
- Parameters
-
stream | input stream |
offset | offset |
buffer | buffer |
count | count |
- Returns
- the read data
◆ GetDisableKerning()
static eC_Bool CFreeTypeEnv::GetDisableKerning |
( |
| ) |
|
|
static |
Indicates if Kerning is disabled.
- Returns
- True if Kerning is disabled, False if it is enabled.
◆ GetFakeBoldAndItalic()
static eC_Bool CFreeTypeEnv::GetFakeBoldAndItalic |
( |
| ) |
|
|
static |
Indicates if auto-generation of Bold and Italic glyphs is enabled.
- Returns
- True if auto-generation of Bold and Italic glyphs is enabled, False otherwise
◆ LoadRequestedFont()
static eC_Int CFreeTypeEnv::LoadRequestedFont |
( |
const FontResource_t |
eFontID, |
|
|
FT_Face * |
pTheLoadedFace, |
|
|
const FT_Library * |
pFTLibrary |
|
) |
| |
|
static |
Load a font when it was requested by the cache manager. Create a stream object which is used by freetype for reading operations on the font file.
- Parameters
-
eFontID | font ID |
pTheLoadedFace | loaded font face |
pFTLibrary | the font library |
- Returns
- freetype-error-code
◆ SetDisableKerning()
static void CFreeTypeEnv::SetDisableKerning |
( |
const eC_Bool |
bDisableKerning | ) |
|
|
static |
Disables Kerning support for the FreeType Fontwrappers. Since Kerning is not supported by the FreeType caching subsystem it can come at a notable performance cost on low-end platforms. Disabling Kerning can therefore speed up overall text rendering performance.
- Parameters
-
bDisableKerning | True will disable Kerning. False will enable it (if supported by the given FontWrapper) |
◆ SetFakeBoldAndItalic()
static void CFreeTypeEnv::SetFakeBoldAndItalic |
( |
const eC_Bool |
bFakeBoldAndItalic | ) |
|
|
static |
Enables auto-generation of Bold and Italic glyphs. When enabled, all fonts which have the GUIFont_t::FNT_BOLD style set, will be rendered twice with a slight shift, to emulate a "bold" appearance. When enabled, all fonts which have the GUIFont_t::FNT_ITALIC style set, will be transformed by FreeType with a sheering matrix, to emulate an "italic" appearance.
- Parameters
-
bFakeBoldAndItalic | True will enable auto-generation of bold/italic effects. False will disable it. |
The documentation for this class was generated from the following file: