首页 > 应用开发 > IT综合 > ucgui 字体相关实现
ucgui支持等宽字体和变宽字体,支持不同编码格式字符集如ascii,unicode,shift-jis
字体定义为
typedef struct {
GUI_DISPCHAR* pfDispChar;
GUI_GETCHARDISTX* pfGetCharDistX;
GUI_GETFONTINFO* pfGetFontInfo;
GUI_ISINFONT* pfIsInFont;
tGUI_ENC_APIList* pafEncode;
U8 YSize;
U8 YDist;
U8 XMag;
U8 YMag;
union {
void *pFontData;
const GUI_FONT_MONO* pMono;
const GUI_FONT_PROP* pProp;
} p;
U8 Baseline;
} GUI_FONT;
不同字体对应的显示方式可能有差异,如显示Mono、显示多字节字符、AntiAlias显示等typedef struct {
tGUI_GetLineDistX* pfGetLineDistX;
tGUI_GetLineLen* pfGetLineLen;
tGL_DispLine* pfDispLine;
} tGUI_ENC_APIList;
两个有意思的特性:来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/116625/viewspace-966795/ ,如需转载,请注明出处,否则将追究法律责任。