Guiliani  Version 2.6 revision 7293 (documentation build 12)
CFreeTypeEnv Class Reference

Class for all common FreeType functions. More...

#include <FreeTypeEnv.h>

Static Public Member Functions

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 Protected Attributes

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)
 

Detailed Description

Class for all common FreeType functions.

Used by CFntWrapFreeType and CFntWrapFreeTypeOGL and CFntWrapFreeTypeCAFE

See also
CFntWrapFreeType
CFntWrapFreeTypeOGL
CFntWrapFreeTypeCAFE

Member Function Documentation

◆ FreeType_AllocFunc()

static void * CFreeTypeEnv::FreeType_AllocFunc ( FT_Memory  memory,
long  size 
)
static

Callback for memory-allocation

Parameters
memorymemory-manager of freetype
sizesize
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
streaminput stream

◆ FreeType_FreeFunc()

static void CFreeTypeEnv::FreeType_FreeFunc ( FT_Memory  memory,
void *  block 
)
static

Callback for memory-free

Parameters
memorymemory-manager of freetype
blockblock

◆ FreeType_ReAllocFunc()

static void * CFreeTypeEnv::FreeType_ReAllocFunc ( FT_Memory  memory,
long  cur_size,
long  new_size,
void *  block 
)
static

Callback for memory-reallocation

Parameters
memorymemory-manager of freetype
cur_sizecurrent size of memory-block
new_sizenew size of memory-block
blockblock
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
streaminput stream
offsetoffset
bufferbuffer
countcount
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
eFontIDfont ID
pTheLoadedFaceloaded font face
pFTLibrarythe 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
bDisableKerningTrue 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
bFakeBoldAndItalicTrue will enable auto-generation of bold/italic effects. False will disable it.

The documentation for this class was generated from the following file: