[go: up one dir, main page]

CN103186507A - Dot matrix font library processing method - Google Patents

Dot matrix font library processing method Download PDF

Info

Publication number
CN103186507A
CN103186507A CN2011104606479A CN201110460647A CN103186507A CN 103186507 A CN103186507 A CN 103186507A CN 2011104606479 A CN2011104606479 A CN 2011104606479A CN 201110460647 A CN201110460647 A CN 201110460647A CN 103186507 A CN103186507 A CN 103186507A
Authority
CN
China
Prior art keywords
dot matrix
font
character
dot
display screen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011104606479A
Other languages
Chinese (zh)
Other versions
CN103186507B (en
Inventor
郝鹏
宋福香
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Datang Gaohong Digital Technology Co.,Ltd.
Original Assignee
BEIJING DATANG GOHIGH SOFTWARE TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING DATANG GOHIGH SOFTWARE TECHNOLOGY Co Ltd filed Critical BEIJING DATANG GOHIGH SOFTWARE TECHNOLOGY Co Ltd
Priority to CN201110460647.9A priority Critical patent/CN103186507B/en
Publication of CN103186507A publication Critical patent/CN103186507A/en
Application granted granted Critical
Publication of CN103186507B publication Critical patent/CN103186507B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)

Abstract

The invention provides a dot matrix font library processing method which is suitable for a dot-matrix display screen. The dot matrix font library processing method comprises the following steps: step one, generating a standard dot matrix font library; and step two, adjusting each dot matrix character according to the order of dot matrix characters in the standard dot matrix font. Step two comprises the following sub-steps: extracting corresponding font date of the dot matrix character; adjusting the height and width of the data of the extracted character according to the size of the dot matrix display screen so as to generate font date with adjusted height and width; adjusting the modular mode of the font date with adjusted height and width according to the modular requirement of the dot-matrix display screen so as to generate font data with adjusted modular mode; storing the font data with adjusted modular mode according to the character reading and displaying order of the dot-matrix display screen; and generating a target font library after each dot matrix character being adjusted. The dot matrix font library processing method is applicable to various dot matrix font libraries, can be used for various embedded systems and terminal devices, and can provide a good man-machine interaction interface.

Description

点阵字库处理方法Dot matrix font processing method

技术领域 technical field

本发明涉及一种点阵字库处理方法,特别是涉及一种可以根据不同点阵显示屏对显示数据的要求,将标准大小的点阵字库处理为符合要求的目标字库的点阵字库处理方法。The invention relates to a dot matrix font processing method, in particular to a dot matrix font processing method which can process a dot matrix font of a standard size into a target font meeting the requirements according to the requirements of different dot matrix display screens for display data.

背景技术 Background technique

点阵字库是一个数据文件,在这个数据文件中保存有所有文字的点阵数据。点阵字库中保存的文字的字模数据,对于16*16点阵的汉字字库,每个汉字占用32个字节,从上到下共16行,每行两个字节共16位。点阵汉字的字模数据存储很规范,分为横向取模和纵向取模两种:横向取模是以行为单位,按照从左到右、从上到下的顺序存储字模数据;纵向取模是以列为单位,按照先前8行从上到下、从左到右,再后8行从上到下、从左到右的顺序来存储字模数据。The dot matrix font library is a data file in which the dot matrix data of all characters are stored. The font data of the characters stored in the dot matrix font, for the 16*16 dot matrix Chinese character font, each Chinese character occupies 32 bytes, a total of 16 lines from top to bottom, each line has two bytes and a total of 16 bits. The font data storage of dot-matrix Chinese characters is very standardized, and it is divided into two types: horizontal modulus and vertical modulus: horizontal modulo is based on row units, and font data is stored in order from left to right and from top to bottom; vertical modulo is The font data is stored in the order of the first 8 rows from top to bottom and from left to right, and the last 8 rows from top to bottom and from left to right in units of columns.

随着嵌入式技术的不断发展,用户对嵌入式产品的需求日益增多,而产品的界面显示效果能够直接影响到用户对产品的选择。目前,对于国内用户,LCD显示屏大多使用16*16大小的点阵汉字字库,由于显示出的字间距和行间距很小,所以显示效果较为拥挤而不够美观,常用的方法是将汉字通过相关的算法压缩至14*14大小。压缩后虽然能够保证合适的间距,但压缩后的汉字本身会由于发生变形而变得不够美观。现在市场上也出现了一些字库处理芯片,使用后可达到良好的效果,但也增加了硬件成本。如果自行开发点阵字库,又会花费大量的人力和时间,得不偿失。因此,能够在标准点阵字库的基础上开发出字体美观,大小合适的点阵字库就变得格外关键。With the continuous development of embedded technology, the user's demand for embedded products is increasing day by day, and the interface display effect of the product can directly affect the user's choice of the product. At present, for domestic users, most LCD screens use 16*16 dot-matrix Chinese character fonts. Because the displayed character spacing and line spacing are very small, the display effect is relatively crowded and not beautiful enough. The common method is to pass Chinese characters through relevant The algorithm compresses to 14*14 size. Although the appropriate spacing can be guaranteed after compression, the compressed Chinese characters themselves will become unattractive due to deformation. There are also some font processing chips on the market now, which can achieve good results after use, but also increase the hardware cost. If the dot matrix font library is developed by itself, it will cost a lot of manpower and time, and the gain outweighs the gain. Therefore, it is extremely critical to be able to develop a font with beautiful fonts and a suitable size on the basis of the standard dot matrix font.

发明内容 Contents of the invention

鉴于上述原因,本发明的目的在于提供一种可以根据不同点阵显示屏对显示数据的要求,将标准大小的点阵字库处理为符合要求的目标字库的点阵字库处理方法。In view of the above reasons, the purpose of the present invention is to provide a dot matrix font processing method that can process a dot matrix font of a standard size into a target font that meets the requirements according to the requirements of different dot matrix display screens for display data.

为实现上述目的,本发明采用以下技术方案:To achieve the above object, the present invention adopts the following technical solutions:

一种点阵字库处理方法,适用于点阵显示屏,其特征在于,该方法包括以下步骤:A dot-matrix font processing method, suitable for dot-matrix display screens, is characterized in that the method comprises the following steps:

1)生成标准点阵字库;1) Generate a standard dot matrix font library;

2)按照该标准点阵字库中点阵文字的顺序,对每个点阵文字进行处理,具体为:2) According to the order of the dot matrix characters in the standard dot matrix font library, each dot matrix character is processed, specifically:

21)对处理到的点阵文字,提取出该点阵文字相应的字模数据;21) For the processed dot matrix text, extract the font data corresponding to the dot matrix text;

22)根据所述点阵显示屏的大小要求,调整该提取出的字模数据的高度和宽度,生成经高度和宽度调整的字模数据;22) According to the size requirements of the dot-matrix display screen, adjust the height and width of the extracted character data to generate height- and width-adjusted character data;

23)根据所述点阵显示屏的取模要求,调整该经高度和宽度调整的字模数据的取模方式,生成经取模方式调整的字模数据;23) According to the modulo-taking requirements of the dot matrix display screen, adjust the modulo-taking mode of the font data adjusted through height and width, and generate the modulo-taking mode adjusted through the modulo-taking mode;

24)按照所述点阵显示屏读取显示文字的顺序,将该经取模方式调整的字模数据存储起来;24) According to the order in which the display text is read by the dot matrix display screen, the font data adjusted by the modulus mode is stored;

3)标准点阵字库中每个点阵文字均处理后,生成目标字库。3) After each dot-matrix character in the standard dot-matrix font is processed, the target font is generated.

所述标准点阵字库为基于GB2312-80标准编码的点阵字库。The standard dot matrix font is a dot matrix font encoded based on the GB2312-80 standard.

所述点阵显示屏为LCD显示屏。The dot matrix display is an LCD display.

本发明的优点在于:The advantages of the present invention are:

1、可以有效的调整文字整体的显示效果,与压缩方法相比,文字显示的效果更加美观。1. It can effectively adjust the overall display effect of the text. Compared with the compression method, the text display effect is more beautiful.

2、适用于各种点阵字库,且可用于各种嵌入式系统和终端设备,能够提供良好的人机交互界面。2. It is suitable for various dot matrix fonts, and can be used in various embedded systems and terminal devices, and can provide a good human-computer interaction interface.

附图说明 Description of drawings

图1为本发明的处理流程图;Fig. 1 is the processing flowchart of the present invention;

图2为一实施例中经本发明处理后的显示效果图。Fig. 2 is a display effect diagram after being processed by the present invention in an embodiment.

具体实施方式 Detailed ways

以下结合附图和实施例对本发明作进一步详细的说明。The present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments.

本发明提供的点阵字库处理方法适用于点阵显示屏,该点阵显示屏可为LCD显示屏、LED显示屏等具有点阵结构的显示屏;点阵字库可为点阵汉字字库、点阵英文字库、点阵日韩文字库等,此仅为举例说明,并不以此为限。The dot matrix font processing method provided by the present invention is suitable for dot matrix display screens, and the dot matrix display screens can be LCD display screens, LED display screens and other display screens with a dot matrix structure; Array English fonts, dot matrix Japanese and Korean fonts, etc., are just examples and are not limited thereto.

以下将以把点阵汉字字库处理为适于LCD显示屏显示的实施例,说明本发明的技术方案。The technical solution of the present invention will be described below with an embodiment in which the dot matrix Chinese character library is processed to be suitable for LCD display.

假如所选的LCD显示屏的要求是:16*12的定制字库,纵向取模,按逆序显示每个字节的数据,则为了生成适于该LCD显示屏显示的目标字库,本发明可通过以下步骤实现:If the requirement of the selected LCD display screen is: 16*12 customized character library, modulus vertically, and display the data of each byte in reverse order, then in order to generate the target font library suitable for this LCD display screen display, the present invention can pass The following steps are implemented:

1)生成标准点阵字库;1) Generate a standard dot matrix font library;

根据所选LCD显示屏的要求,首先使用点阵字库生成软件自动生成一个12*16的标准点阵宋体汉字字库,其中,每个汉字的字模数据大小为24字节,取模方式为横向取模,该标准点阵字库为基于GB2312-80标准编码的点阵字库。According to the requirements of the selected LCD display, firstly use the dot matrix font generation software to automatically generate a 12*16 standard dot matrix Song style Chinese character font, in which, the font data size of each Chinese character is 24 bytes, and the modulus is taken horizontally module, the standard dot matrix font is a dot matrix font based on GB2312-80 standard encoding.

2)按照该标准点阵字库中点阵文字的顺序,对每个点阵文字进行处理,具体为:2) According to the order of the dot matrix characters in the standard dot matrix font library, each dot matrix character is processed, specifically:

21)对处理到的点阵文字,提取出该点阵文字的字模数据;21) For the processed dot-matrix characters, extract the font data of the dot-matrix characters;

本实施例中,首先定位到待处理点阵汉字字模数据的首地址,然后从该首地址开始提取出24个字节的数据即为该点阵汉字的字模数据。In this embodiment, first locate the first address of the dot matrix Chinese character data to be processed, and then extract 24 bytes of data from the first address, which is the dot matrix Chinese character data.

22)根据所述点阵显示屏的大小要求,调整该提取出的字模数据的高度和宽度,生成经高度和宽度调整的字模数据;22) According to the size requirements of the dot-matrix display screen, adjust the height and width of the extracted character data to generate height- and width-adjusted character data;

本实施例中,由于选用的标准点阵汉字字库的每个字模数据为12*16,而所选LCD显示屏要求的每个字模数据为16*12,所以需要将步骤21)提取出的字模数据的高度由12增加为16,宽度由16减小为12,以得到16*12的字模数据。In the present embodiment, because each font data of the selected standard dot matrix Chinese character library is 12*16, and each font data required by the selected LCD display screen is 16*12, so the font extracted in step 21) needs to be extracted. The height of the data is increased from 12 to 16, and the width is reduced from 16 to 12 to obtain 16*12 font data.

23)根据所述点阵显示屏的取模要求,调整该经高度和宽度调整的字模数据的取模方式,生成经取模方式调整的字模数据;23) According to the modulo-taking requirements of the dot matrix display screen, adjust the modulo-taking mode of the font data adjusted through height and width, and generate the modulo-taking mode adjusted through the modulo-taking mode;

本实施例中,由于选用的标准点阵汉字字库的取模方式为横向取模,而所选LCD显示屏的取模方式为纵向取模,所以需要将步骤22)处理后的经高度和宽度调整后的字模数据由横向取模方式转换为纵向取模方式。In the present embodiment, because the modulus mode of the selected standard dot matrix Chinese character library is horizontal modulus, and the modulo mode of the selected LCD display screen is vertical modulo, so the height and width after processing in step 22) need to be The adjusted font data is converted from a horizontal mode to a vertical mode.

24)按照所述点阵显示屏读取显示文字的顺序,将该经取模方式调整的字模数据存储起来;24) According to the order in which the display text is read by the dot matrix display screen, the font data adjusted by the modulus mode is stored;

本实施例中,由于所选LCD显示屏是按逆序显示每个字节的数据的,所以需要将步骤23)处理后的经取模方式调整后的字模数据的每个字节先逆序处理再存储起来。In this embodiment, since the selected LCD display screen displays the data of each byte in reverse order, each byte of the font data adjusted by the modulo mode after processing in step 23) needs to be processed in reverse order first and then processed in reverse order. Store it up.

3)标准点阵字库中每个点阵文字均处理后,生成目标字库。3) After each dot-matrix character in the standard dot-matrix font is processed, the target font is generated.

当所选标准点阵汉字字库中的每个点阵汉字都经步骤21)至步骤24)转换处理后,即可生成适于所选LCD显示屏显示的目标字库。After each dot-matrix Chinese character in the selected standard dot-matrix Chinese character library has been converted from step 21) to step 24), a target font suitable for display on the selected LCD screen can be generated.

目标字库生成后,可编写测试程序测试效果,如图2所示,在所选LCD显示屏上显示的汉字字间距和行间距适中,显示效果较为美观。After the target font library is generated, you can write a test program to test the effect. As shown in Figure 2, the Chinese characters displayed on the selected LCD display have moderate character spacing and line spacing, and the display effect is more beautiful.

本发明通过先生成标准点阵字库,然后根据所选点阵显示屏的要求,对标准点阵字库中每个文字的字模数据进行高度、宽度调整、取模方式调整、字节存储顺序调整等,标准点阵字库中每个文字都调整后,即可生成适于所选点阵显示屏显示的目标字库。本发明的点阵字库处理方法适用于各种标准点阵字库,且可用于各种嵌入式系统和终端设备中,能够提供良好的人机交互界面。The present invention firstly generates a standard dot matrix font, and then according to the requirements of the selected dot matrix display, adjusts the height and width of the font data of each character in the standard dot matrix font, adjusts the mode of taking the model, and adjusts the byte storage order, etc. , after each character in the standard dot-matrix font is adjusted, the target font suitable for the selected dot-matrix display can be generated. The dot matrix font processing method of the present invention is applicable to various standard dot matrix fonts, can be used in various embedded systems and terminal equipment, and can provide a good human-computer interaction interface.

以上所述是本发明的较佳实施例及其所运用的技术原理,对于本领域的技术人员来说,在不背离本发明的精神和范围的情况下,任何基于本发明技术方案基础上的等效变换、简单替换等显而易见的改变,均属于本发明保护范围之内。The above are the preferred embodiments of the present invention and the technical principles used therefor. For those skilled in the art, without departing from the spirit and scope of the present invention, any technical solution based on the present invention Obvious changes such as equivalent transformation and simple replacement all fall within the protection scope of the present invention.

Claims (3)

1. a dot matrix word library disposal route is applicable to dot matrix display screen, it is characterized in that, this method may further comprise the steps:
1) generates the standard dot matrix word library;
2) according to the order of dot matrix character in this standard dot matrix word library, each dot matrix character is handled, is specially:
21) dot matrix character that processing is arrived extracts the corresponding character pattern data of this dot matrix character;
22) according to the size requirements of described dot matrix display screen, adjust height and the width of this character pattern data that extracts, generate the character pattern data through height and width adjustment;
23) according to the delivery requirement of described dot matrix display screen, adjust this through the delivery mode of the character pattern data of height and width adjustment, generate the character pattern data of adjusting through the delivery mode;
24) according to the order of described dot matrix display screen reading displayed literal, this character pattern data of adjusting through the delivery mode is stored;
3) after each dot matrix character is all handled in the standard dot matrix word library, generate the target character library.
2. a kind of dot matrix word library disposal route according to claim 1 is characterized in that, described standard dot matrix word library is the dot matrix word library based on the GB2312-80 standard code.
3. a kind of dot matrix word library disposal route according to claim 2 is characterized in that, described dot matrix display screen is LCD display.
CN201110460647.9A 2011-12-31 2011-12-31 Dot matrix word library processing method Active CN103186507B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110460647.9A CN103186507B (en) 2011-12-31 2011-12-31 Dot matrix word library processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110460647.9A CN103186507B (en) 2011-12-31 2011-12-31 Dot matrix word library processing method

Publications (2)

Publication Number Publication Date
CN103186507A true CN103186507A (en) 2013-07-03
CN103186507B CN103186507B (en) 2016-12-28

Family

ID=48677678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110460647.9A Active CN103186507B (en) 2011-12-31 2011-12-31 Dot matrix word library processing method

Country Status (1)

Country Link
CN (1) CN103186507B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484314A (en) * 2014-12-09 2015-04-01 朱信 Producing method of font library special for Chinese vertical-typeset ancient books and calligraphy
CN104717548A (en) * 2015-03-05 2015-06-17 福建新大陆通信科技股份有限公司 Processing method and processing system of fonts of set top box lattice subtitles
CN106021205A (en) * 2016-06-17 2016-10-12 宁波柯力传感科技股份有限公司 Language and character display method for large dot matrix screen
CN108021424A (en) * 2017-12-15 2018-05-11 苏州咖博士咖啡系统科技有限公司 LCD screen shows that various countries' language produces the solution method of word spacing
CN109218845A (en) * 2017-07-01 2019-01-15 武汉斗鱼网络科技有限公司 Optimize method, storage medium, electronic equipment and the system of barrage display effect

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0452690A (en) * 1990-06-20 1992-02-20 Sony Corp Display device
CN1983239A (en) * 2006-04-06 2007-06-20 华为技术有限公司 Method and system for inputting and displaying character
CN101008939A (en) * 2007-01-25 2007-08-01 深圳创维-Rgb电子有限公司 Implementation method of dot matrix word library of embedded system
CN101114443A (en) * 2006-07-28 2008-01-30 中国科学院声学研究所 Indentation method of dot-matrix characters in two-dimensional graphics engine and Chinese processing method
CN101968814A (en) * 2010-10-29 2011-02-09 四川长虹电器股份有限公司 Dot matrix font manufacturing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0452690A (en) * 1990-06-20 1992-02-20 Sony Corp Display device
CN1983239A (en) * 2006-04-06 2007-06-20 华为技术有限公司 Method and system for inputting and displaying character
CN101114443A (en) * 2006-07-28 2008-01-30 中国科学院声学研究所 Indentation method of dot-matrix characters in two-dimensional graphics engine and Chinese processing method
CN101008939A (en) * 2007-01-25 2007-08-01 深圳创维-Rgb电子有限公司 Implementation method of dot matrix word library of embedded system
CN101968814A (en) * 2010-10-29 2011-02-09 四川长虹电器股份有限公司 Dot matrix font manufacturing method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
余辉等: "多种字库在嵌入式系统中的应用", 《武汉工业学院学报》, vol. 27, no. 2, 15 June 2008 (2008-06-15), pages 48 - 50 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484314A (en) * 2014-12-09 2015-04-01 朱信 Producing method of font library special for Chinese vertical-typeset ancient books and calligraphy
CN104717548A (en) * 2015-03-05 2015-06-17 福建新大陆通信科技股份有限公司 Processing method and processing system of fonts of set top box lattice subtitles
CN104717548B (en) * 2015-03-05 2017-11-24 福建新大陆通信科技股份有限公司 A kind of set top box dot matrix captions font processing method and processing system
CN106021205A (en) * 2016-06-17 2016-10-12 宁波柯力传感科技股份有限公司 Language and character display method for large dot matrix screen
CN109218845A (en) * 2017-07-01 2019-01-15 武汉斗鱼网络科技有限公司 Optimize method, storage medium, electronic equipment and the system of barrage display effect
CN109218845B (en) * 2017-07-01 2020-09-04 武汉斗鱼网络科技有限公司 Method, storage medium, electronic device and system for optimizing bullet screen display effect
CN108021424A (en) * 2017-12-15 2018-05-11 苏州咖博士咖啡系统科技有限公司 LCD screen shows that various countries' language produces the solution method of word spacing

Also Published As

Publication number Publication date
CN103186507B (en) 2016-12-28

Similar Documents

Publication Publication Date Title
CN103186507B (en) Dot matrix word library processing method
US20130174024A1 (en) Method and device for converting document format
CN103092954A (en) Low-resolution placeholder content for file navigation
CN105718435A (en) Reflow Of Handwriting Content And Electronic Device
CN113268949B (en) Form display method and device based on dynamic fields, computer equipment and medium
US20140068495A1 (en) Apparatus and method for processing handwriting input
CN102419742A (en) Subtitle processing method and device applied to electronic equipment
US20170269815A1 (en) Object management and visualization using a computing device
CN102999599A (en) Method and device for displaying picture
US20140157116A1 (en) Method and Device for Determining a Display Mode of Electronic Documents
CN111915705B (en) Picture visual editing method, device, equipment and medium
CN106293462B (en) Character display method and device
CN101207742B (en) Method and device for paging of display contents and digital television receiving device
CN102508822A (en) Thai display method, device and system
CN104536947A (en) Layout document processing method and device
KR102087274B1 (en) Web electric document editing apparatus for rendering object and operating method thereof
US20170329756A1 (en) Electronic document editing apparatus capable of inserting memo into paragraph, and operating method thereof
CN202502716U (en) LED display screen asynchronous controller based on USB memory interface
CN106406561B (en) Character library lattice generation method based on generator set controller
CN103020127A (en) Method and device for displaying picture
CN103745710B (en) Word message playing device and method
CN103605640B (en) Form adaption method and device
CN103455297B (en) Editor and display methods of the dynamic synchronization character information bar code in television system
CN101763845A (en) Method for calculating the display width of characters in a dot matrix character library
CN111399788A (en) Media file playing method and media file playing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 100191 No. 40, Haidian District, Beijing, Xueyuan Road

Patentee after: Beijing Datang Gaohong Digital Technology Co.,Ltd.

Country or region after: China

Address before: 100191 No. 40, Haidian District, Beijing, Xueyuan Road

Patentee before: BEIJING DATANG GOHIGH SOFTWARE TECHNOLOGY Co.,Ltd.

Country or region before: China