MHEG5  15.3.0
source/graphics/inc/mg_fontapi.h File Reference

Font file handling with the Freetype. More...

#include "techtype.h"

Go to the source code of this file.

Data Structures

struct  s_FontMetrics

Typedefs

typedef struct sFontSizeH_FontSize
typedef struct s_FontMetrics S_FontMetrics

Functions

BOOLEAN MG_FontInit (BOOLEAN isHD)
 Initialise freetype library and load "built-in" font.
void MG_SetMaxFonts (U16BIT max)
 Set Max allowable fonts for profile.
void MG_FontExit (void)
 Free all data associated with built-in font and terminate freetype library.
S16BIT MG_FontLoadFile (const U8BIT *data, U32BIT length)
 Load font data file into memory for freetype.
H_FontSize MG_AllocateFont (S16BIT fnt_index, U8BIT fnt_size, U8BIT fnt_style)
 Allocate font of particular size from font file.
void MG_ReleaseFont (H_FontSize f_sz)
 Allocate font of particular size from font file.
void MG_GetFontMetrics (H_FontSize f_sz, S_FontMetrics *pMetrics)
 Get font Metrics.
void MG_FontFreeFile (S16BIT font_index)
 free memory associated with file

Detailed Description

Font file handling with the Freetype.

Date:
15/04/2010
Author:
Adam Sturtridge

Function Documentation

H_FontSize MG_AllocateFont ( S16BIT  fnt_index,
U8BIT  fnt_size,
U8BIT  fnt_style 
)

Allocate font of particular size from font file.

Parameters:
font_indexindex into MG's font array - from MG_FontLoadFile()
font_sizesize in points
Returns:
Handle to font size
void MG_FontExit ( void  )

Free all data associated with built-in font and terminate freetype library.

Parameters:
n/a
Returns:
n/a
void MG_FontFreeFile ( S16BIT  font_index)

free memory associated with file

Parameters:
font_indexindex into MG's font array - from MG_FontLoadFile()
Returns:
n/a
BOOLEAN MG_FontInit ( BOOLEAN  isHD)

Initialise freetype library and load "built-in" font.

Parameters:
isHDindicate whether supporting MHEG HD extension
Returns:
TRUE - success, FALSE - failure
S16BIT MG_FontLoadFile ( const U8BIT *  data,
U32BIT  length 
)

Load font data file into memory for freetype.

Parameters:
datafont file data
lengthlength of font file data
Returns:
index into the MG's font array (on failure this is -1)
void MG_GetFontMetrics ( H_FontSize  f_sz,
S_FontMetrics pMetrics 
)

Get font Metrics.

Parameters:
font_indexindex into MG's font array - from MG_FontLoadFile()
Returns:
n/a
void MG_ReleaseFont ( H_FontSize  f_sz)

Allocate font of particular size from font file.

Parameters:
font_indexindex into MG's font array - from MG_FontLoadFile()
font_sizesize in points
Returns:
n/a
void MG_SetMaxFonts ( U16BIT  max)

Set Max allowable fonts for profile.

Parameters:
n/a
Returns:
n/a
 All Data Structures Files Functions Variables Typedefs Defines