特殊尺寸ASCII字符的應(yīng)用
作者:BW.SU 發(fā)表日期:2025-06-11 來(lái)源:菱致電子 瀏覽:
- 特殊尺寸ASCII字符的應(yīng)用
UI設(shè)計(jì)會(huì)碰到字符就差那么一點(diǎn),比如24點(diǎn)偏小,32點(diǎn)又偏大,針對(duì)ASCII字符的特殊尺寸需求,這里有方法!本例提供特殊的ASCII字符的效果演示,這里制作了24x24點(diǎn),同時(shí)又制作了20x20點(diǎn),請(qǐng)看實(shí)例:
參考代碼:/* 字庫(kù)初始化 */Ext_Font_Init(CS1,0);Font_Line_Distance(0);Set_Font_to_Font_Width(0);// ASCII: 24x24點(diǎn)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點(diǎn)字體/ASCII為24x24點(diǎn) 緊湊格式");Goto_Text_XY(10,130);Show_String("Specializing in the design of small-to-medium-sized LCD controllers and driver ICs ");// ASCII: 20x20點(diǎn)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點(diǎn)字體/ASCII為20x20點(diǎn) 緊湊格式");Goto_Text_XY(10,190);Show_String("Specializing in the design of small-to-medium-sized LCD controllers and driver ICs ");
字符特點(diǎn):
1. 支持ASCII字符集
2. 可制作32點(diǎn)以下字符,不限寬高是否為8的倍數(shù)
3. 緊湊排列,非等寬
可定制,請(qǐng)聯(lián)絡(luò)我司進(jìn)行交流。
分享到: