摘要
针对FLTK(Fast Light Tool Kit)控件自身不能对文本串自动分行显示的问题,提出一种可兼容GB2312、UTF-8等多种编码方式,根据测量预显示文本串在控件中所占像素宽度来分割文本显示的方法。通过与现有文本分行显示方法的对比分析,该方法在减少文本编辑工作量和提高文本分行显示效果上具有明显的优势,为文本智能分行显示技术提供一种新的参考。
Aiming at the problem that FLTK widgets could not automatically branch display the text string, we proposed a coding method compatible with GB2312, UTF-8, etc. The text display was segmented according to the measured pixel width of the pre-displayed text string in the widgets. Compared with the existing methods of text branch display, the method has obvious advantages in reducing the workload of text editing and improving the effect of text branch display. It provides a new reference for text intelligent branch display technology.
作者
李凯
饶天贵
胡士杰
曾升
Li Kai;Rao Tiangui;Hu Shijie;Zeng Sheng(Rail Transit Technology Center,Zhuzhou CRRC Times Electric Co.,Ltd.,Zhuzhou 412001,Hunan,China;Data and Intelligent Technology Center,Zhuzhou CRRC Times Electric Co.,Ltd.,Zhuzhou 412001,Hunan,China)
出处
《计算机应用与软件》
北大核心
2018年第12期325-328,333,共5页
Computer Applications and Software