/***************************************************************************** ** File: tt_font.h ** ** Description: Contains prototypes for TT font related APIs. ** ** Copyright(c) 2008 Sunmedia Technologies - All Rights Reserved ** ** Author : ** ** $Id: *****************************************************************************/ #ifndef _TT_FONT_H_ #define _TT_FONT_H_ #include "stddefs.h" #ifdef CONFIG_TTF12X10_SUPPORT #define TT_NEWFONT_SUPPORT (0) #else #define TT_NEWFONT_SUPPORT (1) #endif typedef enum { FONT_TTX_NO_CHARSET = 0, FONT_TTX_LATIN_G0, FONT_TTX_LATIN_NATIONAL_OP, FONT_TTX_LATIN_G2, FONT_TTX_CYRILLIC_G0_OPTION1, FONT_TTX_CYRILLIC_G0_OPTION2, FONT_TTX_CYRILLIC_G0_OPTION3, FONT_TTX_CYRILLIC_G2, FONT_TTX_GREEK_G0, FONT_TTX_GREEK_G2, FONT_TTX_ARABIC_G0, FONT_TTX_ARABIC_G2, FONT_TTX_HEBREW_G0, FONT_TTX_FARSI_G0, FONT_TTX_FARSI_G2, FONT_TTX_MOSAICS_G1, FONT_TTX_MOSAICS_G3, FONT_TTX_LAST } FONT_TT_CharSet_e; typedef enum { FONT_TTX_SUBSET_NO_SUBSET = 0, FONT_TTX_SUBSET_CZECH, FONT_TTX_SUBSET_SLOVAK = FONT_TTX_SUBSET_CZECH, FONT_TTX_SUBSET_ENGLISH, FONT_TTX_SUBSET_ESTONIAN, FONT_TTX_SUBSET_FRENCH, FONT_TTX_SUBSET_GERMAN, FONT_TTX_SUBSET_ITALIAN, FONT_TTX_SUBSET_LETTISH, FONT_TTX_SUBSET_LITHUANIAN = FONT_TTX_SUBSET_LETTISH, FONT_TTX_SUBSET_POLISH, FONT_TTX_SUBSET_PORTUGUESE, FONT_TTX_SUBSET_SPANISH = FONT_TTX_SUBSET_PORTUGUESE, FONT_TTX_SUBSET_RUMANIAN, FONT_TTX_SUBSET_SERBIAN, FONT_TTX_SUBSET_CROATIAN = FONT_TTX_SUBSET_SERBIAN, FONT_TTX_SUBSET_SLOVENIAN = FONT_TTX_SUBSET_SERBIAN, FONT_TTX_SUBSET_SWEDISH, FONT_TTX_SUBSET_FINNISH = FONT_TTX_SUBSET_SWEDISH, FONT_TTX_SUBSET_TURKISH, FONT_TTX_SUBSET_LAST } FONT_TT_NationalOpSubSet_e; /** TT national option encode */ typedef enum { FONT_TTX_NATIONAL_OP_EN23_IDX = 0, FONT_TTX_NATIONAL_OP_EN24_IDX, FONT_TTX_NATIONAL_OP_EN40_IDX, FONT_TTX_NATIONAL_OP_EN5B_IDX, FONT_TTX_NATIONAL_OP_EN5C_IDX, FONT_TTX_NATIONAL_OP_EN5D_IDX, FONT_TTX_NATIONAL_OP_EN5E_IDX, FONT_TTX_NATIONAL_OP_EN5F_IDX, FONT_TTX_NATIONAL_OP_EN60_IDX, FONT_TTX_NATIONAL_OP_EN7B_IDX, FONT_TTX_NATIONAL_OP_EN7C_IDX, FONT_TTX_NATIONAL_OP_EN7D_IDX, FONT_TTX_NATIONAL_OP_EN7E_IDX, FONT_TTX_NATIONAL_OP_EN_IDX_LAST } FONT_TT_NationalOpEncodeIdx_e; /*font header*/ typedef struct { UINT8 u8Version; UINT8 u8HeadSize; UINT8 u8Baseline; UINT8 u8Width; UINT8 u8Height; UINT16 u16MinCode; UINT16 u16MaxCode; UINT16 u16CodePage; UINT16 u16Flag; UINT16 u16CharNum; UINT16 u16AreaNum; } FONT_TT_Header_t; typedef struct { INT32 *p_array; INT8 p_style; INT32 p_size; INT8 p_char_spacing; } FONT_TT_Info_t; typedef struct _TtCharInfo_t { UINT8 bTtCharCode; UINT8 bTtCharWidth; UINT8 bTtCharHeight; UINT8 *pTtCharBmp; UINT8 bHasMarkFlag; FONT_TT_CharSet_e eTtCharset; FONT_TT_NationalOpSubSet_e eTtSubset; } TtCharInfo_t; //INT32 GDI_tt_fill_rect(HDC hdc, RECT *rect, UINT32 color); void FONT_TT_Set_FontRes(FONT_TT_Info_t *pFontRes); INT32 FONT_get_tt_char_info(TtCharInfo_t *pstCharInfo); #endif /* _TT_FONT_H_ */