结构体GUI_FONT前六个成员就是我们这里实现的,其余的几种字体类型全是如此:
复制代码
DECLARE_FONT(MONO);
DECLARE_FONT(PROP);
DECLARE_FONT(PROP_EXT);
DECLARE_FONT(PROP_FRM);
DECLARE_FONT(PROPAA);
DECLARE_FONT(PROP_AA2);
DECLARE_FONT(PROP_AA2_EXT);
DECLARE_FONT(PROP_AA4);
DECLARE_FONT(PROP_AA4_EXT);
/* MONO: Monospaced fonts */
#define GUI_FONTTYPE_MONO
GUIMONO_DispChar,
GUIMONO_GetCharDistX,
GUIMONO_GetFontInfo,
GUIMONO_IsInFont,
(GUI_GETCHARINFO *)0,
(tGUI_ENC_APIList*)0
/* PROP: Proportional fonts */
#define GUI_FONTTYPE_PROP
GUIPROP_DispChar,
GUIPROP_GetCharDistX,
GUIPROP_GetFontInfo,
GUIPROP_IsInFont,
(GUI_GETCHARINFO *)0,
(tGUI_ENC_APIList*)0
/* PROP_EXT: Extended proportional fonts */
#define GUI_FONTTYPE_PROP_EXT
GUIPROP_EXT_DispChar,
GUIPROP_EXT_GetCharDistX,
GUIPROP_EXT_GetFontInfo,
GUIPROP_EXT_IsInFont,
GUIPROP_EXT_GetCharInfo,
&GUI_ENC_APIList_EXT
/* PROP_FRM: Extended proportional fonts, framed */
#define GUI_FONTTYPE_PROP_FRM
GUIPROP_FRM_DispChar,
GUIPROP_FRM_GetCharDistX,
GUIPROP_FRM_GetFontInfo,
GUIPROP_FRM_IsInFont,
(GUI_GETCHARINFO *)0,
(tGUI_ENC_APIList*)0
/* PROP: Proportional fonts SJIS */
#define GUI_FONTTYPE_PROP_SJIS
GUIPROP_DispChar,
GUIPROP_GetCharDistX,
GUIPROP_GetFontInfo,
GUIPROP_IsInFont,
(GUI_GETCHARINFO *)0,
&GUI_ENC_APIList_SJIS
/* PROPAA: Proportional, antialiased fonts */
#define GUI_FONTTYPE_PROPAA
GUIPROPAA_DispChar,
GUIPROPAA_GetCharDistX,
GUIPROPAA_GetFontInfo,
GUIPROPAA_IsInFont,
(GUI_GETCHARINFO *)0,
(tGUI_ENC_APIList*)0
/* PROP_AA2: Proportional, antialiased fonts, 2bpp */
#define GUI_FONTTYPE_PROP_AA2
GUIPROP_AA2_DispChar,
GUIPROP_AA2_GetCharDistX,
GUIPROP_AA2_GetFontInfo,
GUIPROP_AA2_IsInFont,
(GUI_GETCHARINFO *)0,
(tGUI_ENC_APIList*)0
/* PROP_AA2_EXT: Proportional, antialiased fonts, 2bpp, extended font information */
#define GUI_FONTTYPE_PROP_AA2_EXT
GUIPROP_AA2_EXT_DispChar,
GUIPROP_EXT_GetCharDistX,
GUIPROP_EXT_GetFontInfo,
GUIPROP_EXT_IsInFont,
GUIPROP_EXT_GetCharInfo,
&GUI_ENC_APIList_EXT
/* PROP_AA2: Proportional, antialiased fonts, 2bpp, SJIS encoding */
#define GUI_FONTTYPE_PROP_AA2_SJIS
GUIPROP_AA2_DispChar,
GUIPROP_AA2_GetCharDistX,
GUIPROP_AA2_GetFontInfo,
GUIPROP_AA2_IsInFont,
(GUI_GETCHARINFO *)0,
&GUI_ENC_APIList_SJIS
/* PROP_AA4: Proportional, antialiased fonts, 4bpp */
#define GUI_FONTTYPE_PROP_AA4
GUIPROP_AA4_DispChar,
GUIPROP_AA4_GetCharDistX,
GUIPROP_AA4_GetFontInfo,
GUIPROP_AA4_IsInFont,
(GUI_GETCHARINFO *)0,
(tGUI_ENC_APIList*)0
/* PROP_AA4_EXT: Proportional, antialiased fonts, 4bpp, extended font information */
#define GUI_FONTTYPE_PROP_AA4_EXT
GUIPROP_AA4_EXT_DispChar,
GUIPROP_EXT_GetCharDistX,
GUIPROP_EXT_GetFontInfo,
GUIPROP_EXT_IsInFont,
GUIPROP_EXT_GetCharInfo,
&GUI_ENC_APIList_EXT
/* PROP_AA4: Proportional, antialiased fonts, 4bpp, SJIS encoding */
#define GUI_FONTTYPE_PROP_AA4_SJIS
GUIPROP_AA4_DispChar,
GUIPROP_AA4_GetCharDistX,
GUIPROP_AA4_GetFontInfo,
GUIPROP_AA4_IsInFont,
(GUI_GETCHARINFO *)0,
&GUI_ENC_APIList_SJIS
关于移植部分就给大家讲解这么多,下面对这几个移植的文件简单的说说。 |