特殊尺寸ASCII字符的应用
2025-06-11
特殊尺寸ASCII字符的应用
UI设计会碰到字符就差那么一点,比如24点偏小,32点又偏大,针对ASCII字符的特殊尺寸需求,这里有方法!
本例提供特殊的ASCII字符的效果演示,这里制作了24x24点,同时又制作了20x20点,请看实例:

参考代码:
**
/* 字库初始化 */
Ext_Font_Init(CS1,0);
Font_Line_Distance(0);
Set_Font_to_Font_Width(0);
// ASCII: 24x24点
Select_Font_Height_WxN_HxN_ChromaKey_Alignment(24,1,1,1,0);
Foreground_color_16M(color16M_red);
Set_Font_Style(ARIAL);
Goto_Text_XY(10,100);
Show_String("这一段使用的是24x24点字体/ASCII为24x24点 紧凑格式");
Goto_Text_XY(10,130);
Show_String("Specializing in the design of small-to-medium-sized LCD controllers and driver ICs ");
// ASCII: 20x20点
Select_Font_Height_WxN_HxN_ChromaKey_Alignment(24,1,1,1,0);
Foreground_color_16M(color16M_black);
Set_Font_Style(ARIAL_20);
Goto_Text_XY(10,160);
Show_String("这一段使用的是24x24点字体/ASCII为20x20点 紧凑格式");
Goto_Text_XY(10,190);
Show_String("Specializing in the design of small-to-medium-sized LCD controllers and driver ICs ");
字符特点:
-
支持ASCII字符集
-
可制作32点以下字符,不限宽高是否为8的倍数
-
紧凑排列,非等宽
可定制,请联络我司进行交流。
分享到: