/***************************************************************************** ** font_common.h: Font common header file ** ** Copyright(c) 2008 Sunmedia Technologies - All Rights Reserved ** ** Author : anlzhao ** ** $Id: font_common.h,v 1.3 2009/10/20 07:06:10 qlchen Exp $ *****************************************************************************/ #ifndef _FONT_COMMON_H_ #define _FONT_COMMON_H_ #include "gui_eng/stddefs.h" #include "gui_eng/geng_setting.h" typedef UINT8 FontStyle_e; typedef INT8 FONTSize_t; typedef INT8 UiLANGName_t; typedef INT32 String_id_t; /* Used by gui engine inner */ #define EN_STR_ID_INVALID (-1) #define LANG_NAME_INVALID (-1) /* brief Font Style Format */ typedef enum FONTStyle_t { FONT_STYLE_DEFAULT = 0, FONT_STYLE_ARIAL = FONT_STYLE_DEFAULT, /*!< CC font Arial style */ FONT_STYLE_COURIER, /*!< CC font Courier style */ FONT_STYLE_ENGRAVERS, /*!< CC font Engravers style */ FONT_STYLE_HEL, /*!< CC font Helvetica style */ FONT_STYLE_IMPRESS, /*!< CC font Impress style*/ FONT_STYLE_MARIGOLD, /*!< CC font Marigold style*/ FONT_STYLE_TNR, /*!< CC font Time New Roman style */ /* Following styles are used for vector font configuration. */ FONT_STYLE_BOLD, /*!< Bold style */ #if 0 // Not support (tzungming.lin) FONT_STYLE_ITALIC, /*!< Italic style */ FONT_STYLE_BOLD_ITALIC, /*!< Bold-Italic style */ FONT_STYLE_BORDERING, /*!< Bordering style */ #endif FONT_STYLE_LAST } FONTStyle_t; typedef enum { /* One byte */ FONT_BASE_TT = -2, /* TT font */ FONT_CC708 = -1, /* CC font ,refer to CEA 708-C*/ FONT_BASIC = 0, /* The basic fontbase */ FONT_ENGLISH, /* english, ISO/IEC 8859-1*/ FONT_ISO8859_1=FONT_ENGLISH, FONT_SPANISH=FONT_ISO8859_1, /* spanish, ISO/IEC 8859-1*/ FONT_PORTUGESE=FONT_ISO8859_1, /* portugese, ISO/IEC 8859-1*/ FONT_ISO8859_2, FONT_ISO8859_3, FONT_ISO8859_4, FONT_RUSSIAN, /* russian, ISO/IEC 8859-5*/ FONT_ISO8859_5 = FONT_RUSSIAN, FONT_ARABIC, FONT_ISO8859_6 = FONT_ARABIC, FONT_GREECE, /* greece, ISO/IEC 8859-7*/ FONT_ISO8859_7 = FONT_GREECE, FONT_ISO8859_8, /* hebrew, ISO/IEC 8859-8*/ FONT_ISO8859_9, FONT_ISO8859_10, FONT_THAI, FONT_ISO8859_11 = FONT_THAI, FONT_ISO8859_13, FONT_ISO8859_14, FONT_ISO8859_15, FONT_GERMAN=FONT_ISO8859_15, /* german, ISO/IEC 8859-15, added by junluo 090107*/ FONT_ITALIAN=FONT_ISO8859_15, /* italian, ISO/IEC 8859-15, added by junluo 090107*/ FONT_FRENCH=FONT_ISO8859_15, /* french, ISO/IEC 8859-15*/ FONT_ISO8859_16, FONT_ISO6937, /* refer to ISO/IEC 6937*/ FONT_ATSC_MODE_0X27, /* Actually used for ATSC MODE 0x27 */ /* ** These following micros distinguishes between signal byte ** code set and double bytes font code set */ FONT_VIETNAMESE, FONT_WINDOWS_1250, FONT_WINDOWS_1251, FONT_WINDOWS_1252, FONT_WINDOWS_1253, FONT_WINDOWS_1254, FONT_WINDOWS_1255, FONT_WINDOWS_1256, FONT_WINDOWS_1257, FONT_WINDOWS_1258, FONT_PERSIAN, /* Persian, added by kh.wang */ FONT_HINDI, FONT_SINGLE_BYTE_LAST = FONT_HINDI, /* Double bytes char set */ FONT_GB2312, FONT_SIMPLECH=FONT_GB2312, /* simple chinese, GB2312*/ FONT_BIG5, FONT_TRADITIONALCH=FONT_BIG5, /* traditional chinese, BIG5*/ FONT_KSC5601_1987, FONT_KOREAN=FONT_KSC5601_1987, /* korean, KSC 5601-1987*/ FONT_JIS_X0201, /* Japanese */ FONT_DOUBLE_BYTE_LAST = FONT_JIS_X0201, /* Unicode char set, until now process UTF-8/16 */ FONT_CUSTOM_USER_DEFINED1, FONT_CUSTOM_USER_DEFINED2, FONT_CUSTOM_USER_DEFINED3, FONT_CUSTOM_USER_DEFINED4, FONT_CUSTOM_USER_DEFINED5, FONT_NATIVE_LAST, FONT_UTF8, FONT_UTF16, FONT_LAST } LANGName_t; typedef enum { FONT_AA_LEVEL_NONE = 0, /*!< Do not apply anti-aliasing. */ FONT_AA_LEVEL_4 = 4, /*!< Apply 4-level grayscale color anti-aliasing. */ FONT_AA_LEVEL_8 = 8, /*!< Apply 8-level grayscale color anti-aliasing. */ FONT_AA_LEVEL_FULL = 256, /*!< Apply full grayscale color(256 levels) anti-aliasing. */ } FONT_AA_Level_e; typedef struct { UINT8* pStartIndices; UINT8 bAALevel; UINT8 bAAGroupNum : 4; UINT8 bAAGroupIdx : 4; UINT8 bAADisable : 4; UINT8 bGenPal : 4; } FONT_AA_Info_t; #endif /* _FONT_COMMON_H_ */