FontInterface.h
资源名称:8202s.rar [点击查看]
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:10k
源码类别:
DVD
开发平台:
C/C++
- /**************************************************************************
- * *
- * Copyright (c) 2002 by Sunplus Technology Co., Ltd. *
- * *
- * This software is copyrighted by and is the property of Sunplus *
- * Technology Co., Ltd. All rights are reserved by Sunplus Technology *
- * Co., Ltd. This software may only be used in accordance with the *
- * corresponding license agreement. Any unauthorized use, duplication, *
- * distribution, or disclosure of this software is expressly forbidden. *
- * *
- * This Copyright notice MUST not be removed or modified without prior *
- * written consent of Sunplus Technology Co., Ltd. *
- * *
- * Sunplus Technology Co., Ltd. reserves the right to modify this *
- * software without notice. *
- * *
- * Sunplus Technology Co., Ltd. *
- * 19, Innovation First Road, Science-Based Industrial Park, *
- * Hsin-Chu, Taiwan, R.O.C. *
- **************************************************************************/
- /*--------------------------------------------------------------------------
- | File Name : FontInterface.h
- |
- | Description : Font Interface Header File
- |
- | Version : 0.1
- |
- |
- | Rev Date Author(s) Status & Comments
- |---------------------------------------------------------------------------------
- | 0.1 2004/11/22 yltseng Creating
- |--------------------------------------------------------------------------------*/
- #ifndef _FONT_INTERFACE_H_
- #define _FONT_INTERFACE_H_
- #include "types.h"
- // **************************************************************************************** //
- typedef enum
- {
- FONT_NONE = 0,
- FONT_BIG5,
- FONT_BIG5_COMMON,
- FONT_GB2312,
- FONT_JIS,
- FONT_KSC,
- FONT_RUSSIAN,
- FONT_ISO_8859_1,
- FONT_ISO_8859_2,
- FONT_ISO_8859_5,
- FONT_ISO_8859_9,
- } ENUM_FONT_TYPE;
- typedef enum
- {
- FONT_NOT_IN_RANGE = 0,
- FONT_ONE_BYTE,
- FONT_TWO_BYTE,
- } ENUM_FONT_SIZE;
- typedef struct
- {
- const UINT8* aRange[2]; // For single byte character, put range in aRange[1], and set aRange[0] to NULL
- const UINT8* pTranslateTbl;
- UINT8 aRangeNum[2];
- ENUM_FONT_TYPE enType;
- UINT8 uiTranslateTblNum;
- UINT8 uiWidth;
- UINT8 uiHeight;
- } FontInfo;
- // **************************************************************************************** //
- /**************************************************************************
- * Function Name: ftSetCurrentFont *
- * Purposes: *
- * Set current font's information and data buffer address. *
- * Descriptions: *
- * Font info structure is defined in FontInterface.h. And it can be *
- * seperated from font's raw data. That is I can use same font info on *
- * two different raw data. For example, I can use english's font info *
- * on 12x12 english raw data or on 24x24 english raw data. *
- * Arguments: *
- * pFont : Pointer to font's information, it describes this font's *
- * code range, font size ... etc. *
- * pFontData: Pointer to font's data buffer, and this buffer should *
- * contain bmp raw data of this font. *
- * Returns: *
- * TRUE if success, FALSE otherwise. *
- * See also: *
- * ftIsInCharacterSet, ftGetCharacterBmp, ftGetFontType *
- **************************************************************************/
- extern UINT32 ftSetCurrentFont( const FontInfo* pFont, const UINT8* pFontData );
- /**************************************************************************
- * Function Name: ftIsInCharacterSet *
- * Purposes: *
- * Find out if this character is in current character set or not. *
- * Descriptions: *
- * None *
- * Arguments: *
- * pCode: Pointer to character. Depending on different language, it may*
- * point to 2 byte char(eg:Chinese) or 1 byte character(eg:English) *
- * Returns: *
- * FONT_NOT_IN_RANGE: Not in current character set *
- * FONT_ONE_BYTE : In current character set, and is 1 byte character*
- * FONT_TWO_BYTE : In current character set, and is 2 byte character*
- * See also: *
- * ftSetCurrentFont, ftGetCharacterBmp, ftGetFontType *
- **************************************************************************/
- extern UINT32 ftIsInCharacterSet( const UINT8* pCode );
- /**************************************************************************
- * Function Name: ftGetCharacterBmp *
- * Purposes: *
- * Get input character's bmp raw data. *
- * Descriptions: *
- * None *
- * Arguments: *
- * pCode: Pointer to character. Depending on different language, it may*
- * point to 2 byte char(eg:Chinese) or 1 byte character(eg:English) *
- * pBmp : Pointer to pointer to bmp raw data, if pCode is in current *
- * character set, we will write UINT8* into pBmp, thus pBmp contains *
- * pointer to this character's bmp. *
- * Returns: *
- * FONT_NOT_IN_RANGE: Not in current character set *
- * FONT_ONE_BYTE : In current character set, and is 1 byte character*
- * FONT_TWO_BYTE : In current character set, and is 2 byte character*
- * See also: *
- * ftSetCurrentFont, ftIsInCharacterSet, ftGetFontType *
- **************************************************************************/
- extern UINT32 ftGetCharacterBmp( const UINT8* pCode, const UINT8** pBmp );
- /**************************************************************************
- * Function Name: ftGetFontType *
- * Purposes: *
- * Get what current character set is. *
- * Descriptions: *
- * None *
- * Arguments: *
- * None *
- * Returns: *
- * ENUM_FONT_TYPE, see FontInterface.h. It represents what current *
- * character set is. *
- * See also: *
- * ftSetCurrentFont, ftIsInCharacterSet, ftGetCharacterBmp *
- **************************************************************************/
- extern ENUM_FONT_TYPE ftGetFontType();
- // **************************************************************************************** //
- extern const FontInfo g_Big5FontInfo;
- extern const BYTE JMT_BIG5_12X12_FONT_BITMAP[];
- extern const BYTE font_BIG5_compressed[];
- extern const FontInfo g_Big5CommonFontInfo;
- extern const BYTE JMT_BIG5_12X12_FONT_BITMAP_COMMON[];
- extern const BYTE font_BIG5_common_compressed[];
- extern const FontInfo g_GBFontInfo;
- extern const BYTE GUO_GB2312_12X12_FONT_BITMAP[];
- extern const BYTE font_GB2312_compressed[];
- extern const FontInfo g_JISFontInfo;
- extern const BYTE JP_JISX0213_12X12_FONT_BITMAP[];
- extern const BYTE font_JIS_compressed[];
- extern const FontInfo g_KSCFontInfo;
- extern const BYTE KO_KSC_12X12_FONT_BITMAP[];
- extern const BYTE font_KSC_compressed[];
- extern const FontInfo g_RussianFontInfo;
- extern const BYTE GUO_GB2312_Russian_12X12_FONT_BITMAP[];
- extern const BYTE font_Russian_compressed[];
- extern const FontInfo g_8859_1FontInfo;
- extern const BYTE ISO_8859_1_12X24_FONT_BITMAP[];
- extern const BYTE font_ISO_8859_1_compressed[];
- extern const FontInfo g_8859_2FontInfo;
- extern const BYTE ISO_8859_2_12X24_FONT_BITMAP[];
- extern const BYTE font_ISO_8859_2_compressed[];
- extern const FontInfo g_8859_5FontInfo;
- extern const BYTE ISO_8859_5_12X24_FONT_BITMAP[];
- extern const FontInfo g_8859_9FontInfo;
- extern const BYTE ISO_8859_9_12X24_FONT_BITMAP[];
- extern const BYTE font_ISO_8859_9_compressed[];
- // **************************************************************************************** //
- #endif