特殊尺寸ASCII字符的应用
作者:BW.SU 发表日期: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 ");
字符特点:
1. 支持ASCII字符集
2. 可制作32点以下字符,不限宽高是否为8的倍数
3. 紧凑排列,非等宽
可定制,请联络我司进行交流。
分享到: