MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
mg_fontapi.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2010 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
25 #ifndef _MG_FONTAPI_H
26 #define _MG_FONTAPI_H
27 
28 
29 #include "techtype.h"
30 
31 typedef struct sFontSize *H_FontSize;
32 
33 typedef struct s_FontMetrics
34 {
35  S32BIT ascent;
36  S32BIT descent;
37  S32BIT height;
38  S32BIT minWidth;
39  S32BIT maxWidth;
41 
47 BOOLEAN MG_FontInit( BOOLEAN isHD );
48 
54 void MG_SetMaxFonts(U16BIT max);
55 
62 void MG_FontExit(void);
63 
70 S16BIT MG_FontLoadFile( const U8BIT *data, U32BIT length );
71 
78 H_FontSize MG_AllocateFont(S16BIT fnt_index, U8BIT fnt_size, U8BIT fnt_style);
79 
86 void MG_ReleaseFont( H_FontSize f_sz );
87 
93 void MG_GetFontMetrics( H_FontSize f_sz, S_FontMetrics *pMetrics );
94 
100 void MG_FontFreeFile( S16BIT font_index );
101 
102 #endif /*_MG_FONTAPI_H*/
void MG_GetFontMetrics(H_FontSize f_sz, S_FontMetrics *pMetrics)
Get font Metrics.
Definition: mg_font.c:572
void MG_FontExit(void)
Free all data associated with built-in font and terminate freetype library.
Definition: mg_font.c:185
void MG_FontFreeFile(S16BIT font_index)
free memory associated with file
Definition: mg_font.c:379
H_FontSize MG_AllocateFont(S16BIT fnt_index, U8BIT fnt_size, U8BIT fnt_style)
Allocate font of particular size from font file.
Definition: mg_font.c:485
void MG_SetMaxFonts(U16BIT max)
Set Max allowable fonts for profile.
Definition: mg_font.c:164
BOOLEAN MG_FontInit(BOOLEAN isHD)
Initialise freetype library and load "built-in" font.
Definition: mg_font.c:92
Definition: mg_fontapi.h:33
System Wide Global Technical Data Type Definitions.
Definition: mg_font.h:77
S16BIT MG_FontLoadFile(const U8BIT *data, U32BIT length)
Load font data file into memory for freetype.
Definition: mg_font.c:210
void MG_ReleaseFont(H_FontSize f_sz)
Allocate font of particular size from font file.
Definition: mg_font.c:506