摘要: UCGUI是实时嵌入式系统中广泛使用的图形用户界面,但UCGUI不支持中文字符编解码。为此,提出一种支持中文字符编解码的方法。在分析UCGUI字符编解码框架基础上,修改内核代码,添加GB2312汉字编解码驱动,实现中文字符显示编解码服务。针对UCGUI中文显示时中文字库占用空间大与MCU存储空间有限的矛盾,提出一种字体驱动与字模数据分离的中文字体设计方法,包括为外扩字体设计专用驱动、字模数据存储接口及存储方法。在UCGUI仿真平台环境下的测试结果表明,该字库在UCGUI系列环境下,具有较好的可用性和通用性,可弥补UCGUI界面库在低成本嵌入式系统中难以实现中文显示的缺陷。
关键词:
UCGUI界面库,
外扩字体,
图形界面系统,
字体驱动,
汉字编解码,
GUI仿真器
Abstract: UCGUI is a graphical user interface library which is widely used in real-time embedded system. As it does not support Chinese character set, a method to support Chinese character by adding GB2312 Chinese character coding is proposed. This paper designs and implements a font drive program by which font data is separated from UCGUI library code, including drive for extended font, font data access interface & method. Font drive is tested on the UCGUI simulators and is completely compatible with the UCGUI library. This makes up for technical blank of Chinese display in low-cost embedded system with UCGUI library.
Key words:
UCGUI interface library,
extended font,
graphic interface system,
font drive,
Chinese character coding,
GUI simulator
中图分类号:
李建红,刘丹,徐展. 基于UCGUI库的外扩中文字库研究与实现[J]. 计算机工程.
LI Jian-hong, LIU Dan, XU Zhan. Research and Implementation of Extended Chinese Font Based on UCGUI Library[J]. Computer Engineering.