|
我使用 FontCvt V5.16 来取中文字模,取得内容如下:
#include "GUI.h"
#ifndef GUI_CONST_STORAGE
#define GUI_CONST_STORAGE const
#endif
/* The following line needs to be included in any file selecting the
font.
*/
extern GUI_CONST_STORAGE GUI_FONT GUI_Fontfont_song_20;
/* Start of unicode area <Basic Latin> */
GUI_CONST_STORAGE unsigned char acGUI_Fontfont_song_20_0030[ 11] = { /* code 0030, DIGIT ZERO */
__XX____,
_X__X___,
X____X__,
X____X__,
X____X__,
X____X__,
X____X__,
X____X__,
X____X__,
_X__X___,
__XX____};
/* Start of unicode area <CJK Unified Ideographs> */
GUI_CONST_STORAGE unsigned char acGUI_Fontfont_song_20_5386[ 28] = { /* code 5386 */
__XXXXXX,XXXXXXX_,
__X_____,________,
__X_____,X_______,
__X_____,X_______,
__X_XXXX,XXXXX___,
__X_____,X___X___,
__X_____,X___X___,
__X_____,X___X___,
__X____X,____X___,
__X____X,____X___,
__X___X_,____X___,
_X____X_,____X___,
_X___X__,__XXX___,
X___X___,___X____};
GUI_CONST_STORAGE GUI_CHARINFO_EXT GUI_Fontfont_song_20_CharInfo[2] = {
{ 6, 11, 1, 3, 8, acGUI_Fontfont_song_20_0030 } /* code 0030, DIGIT ZERO */
,{ 15, 14, 0, 1, 16, acGUI_Fontfont_song_20_5386 } /* code 5386 */
};
GUI_CONST_STORAGE GUI_FONT_PROP_EXT GUI_Fontfont_song_20_Prop2 = {
0x5386 /* first character */
,0x5386 /* last character */
,&GUI_Fontfont_song_20_CharInfo[ 1] /* address of first character */
,(GUI_CONST_STORAGE GUI_FONT_PROP_EXT *)0 /* pointer to next GUI_FONT_PROP_EXT */
};
GUI_CONST_STORAGE GUI_FONT_PROP_EXT GUI_Fontfont_song_20_Prop1 = {
0x0030 /* first character */
,0x0030 /* last character */
,&GUI_Fontfont_song_20_CharInfo[ 0] /* address of first character */
,&GUI_Fontfont_song_20_Prop2 /* pointer to next GUI_FONT_PROP_EXT */
};
GUI_CONST_STORAGE GUI_FONT GUI_Fontfont_song_20 = {
GUI_FONTTYPE_PROP_EXT /* type of font */
,16 /* height of font */
,16 /* space of font y */
,1 /* magnification x */
,1 /* magnification y */
,{&GUI_Fontfont_song_20_Prop1}
,14 /* Baseline */
,7 /* Height of lowercase characters */
,11 /* Height of capital characters */
};
显示程序是对一个按键里面的文字进行显示
static void _initDialog( WM_MESSAGE *pMsg )
{
char text[20] = " ";
WM_HWIN hWin = pMsg->hWin;
BUTTON_Handle hObj;
hObj = WM_GetDialogItem( hWin, GUI_ID_BUTTON0 );
text[0] = 0x30;
text[1] = 0x30;
text[2] = 0x53;
text[3] = 0x86;
BUTTON_SetFont( hObj, &GUI_Fontfont_song_20 );
BUTTON_SetText( hObj, text );
}
理论上显示“00历”,但是只能显示“00”,中文的“历”不管怎么取模都显示不出来。
有人知道为什么吗?
|
|