CN106406561B - Character library lattice generation method based on generator set controller - Google Patents

Character library lattice generation method based on generator set controller Download PDF

Info

Publication number
CN106406561B
CN106406561B CN201610775819.4A CN201610775819A CN106406561B CN 106406561 B CN106406561 B CN 106406561B CN 201610775819 A CN201610775819 A CN 201610775819A CN 106406561 B CN106406561 B CN 106406561B
Authority
CN
China
Prior art keywords
character
label
dot matrix
size
picture
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.)
Active
Application number
CN201610775819.4A
Other languages
Chinese (zh)
Other versions
CN106406561A (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.)
Zhengzhou Smartgen Technology Co Ltd
Original Assignee
Zhengzhou Smartgen 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 Zhengzhou Smartgen Technology Co Ltd filed Critical Zhengzhou Smartgen Technology Co Ltd
Priority to CN201610775819.4A priority Critical patent/CN106406561B/en
Publication of CN106406561A publication Critical patent/CN106406561A/en
Application granted granted Critical
Publication of CN106406561B publication Critical patent/CN106406561B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention provides a character library lattice generation method based on a generator set controller, which comprises the following steps: step 1: determining the font and size of a character library to be generated; step 2: firstly, a Picture control is newly built, a Label is newly built on the Picture control, wherein the position of the Label is set to be (0, 0), the AutoSize attribute is set to be true, and the font size is set to be the font size in the step 1; then the word to be converted is displayed on a Label Label; putting the Label Label on a Picture, obtaining the RGB value of the (x, y) coordinate point by means of the Picture.Point (x, y), if the value is 0, indicating that the RGB value is a dot matrix on the word, calculating the size of the byte array according to the position of the byte where the bit is located, wherein the lower bit is at the front and the upper bit is at the back; and step 3: and obtaining the dot matrix of the character in a determinant scanning mode, and storing the dot matrix into the dat file.

Description

Character library lattice generation method based on generator set controller
Technical Field
The invention relates to a method for generating a character library dot matrix, in particular to a method for generating a character library dot matrix based on a generator set controller.
Background
The Chinese character part in the interface display of the generator set controller is stored in a flash of the single chip microcomputer in a lattice mode, a character matrix lattice of Chinese characters needs to be taken, the size of the character is set according to the size of a liquid crystal lattice, the character font often needs to have the sizes of 12 × 12, 24 × 24, 32 × 32 and the like, the size of the character font needs to be set during use, the character font is removed in a mode one by one, then the character font is arranged into a format required by the character font and is placed in a program of the character font, and the method is complicated and is not easy to implement.
In order to solve the above problems, people are always seeking an ideal technical solution.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides a character library dot matrix generation method based on a generator set controller, which is easy to implement and convenient and quick to use.
The purpose of the invention is realized by the following technical scheme: a character library lattice generation method based on a generator set controller comprises the following steps:
step 1: determining the font and the size of a character library to be generated, wherein the size is the number of data bits occupied by the dot matrix of each character;
step 2: firstly, a Picture control is newly built, a Label is newly built on the Picture control, wherein the position of the Label is set to be (0, 0), the AutoSize attribute is set to be true, and the font size is set to be the font size in the step 1; then the word to be converted is displayed on a Label Label; putting a Label Label on a Picture, obtaining the RGB value of the (x, y) coordinate point by a Picture.Point (x, y) method, if the value is 0, indicating that the RGB value is a dot matrix on the word, calculating the size of a byte array according to the position of the byte, wherein V1 = V1 + 2 ^ (x), the lower bit is before and the higher bit is after;
and step 3: and obtaining the dot matrix of the character in a determinant scanning mode, and storing the dot matrix into the dat file.
Based on the above, in step 3, the determinant scanning method: scanning lines, taking 8 points as a unit, scanning from left to right and from top to bottom, scanning low order bits and then high order bits, storing the 8 points as a byte into a byte array, scanning all character sets to obtain a dot matrix of the character, and storing the dot matrix of the character into a dat file.
Compared with the prior art, the method has outstanding substantive characteristics and remarkable progress, and particularly, the generation method provided by the invention is easy to realize, can generate the character set of the character library into a dat file, and can search the dot matrix of the character through the position information of the character when the character is used, so that the character can be directly used, and is convenient and quick.
Detailed Description
The present invention will be described in further detail with reference to the following embodiments:
a character library lattice generation method based on a generator set controller comprises the following steps:
step 1: determining the font and the size of a character library to be generated, wherein the size is the number of data bits occupied by the dot matrix of each character; for example, to generate 24 × 24 sized sons font, the number of dots required for each font is calculated, and 24 × 24 requires 576 dots, that is, 72 bytes; a total of 28672 characters in the Unicode code character set from 0x3000 to 0x9FFF, requiring 28672 x 72 bytes;
step 2: firstly, a Picture control is newly built, a Label is newly built on the Picture control, wherein the position of the Label is set to be (0, 0), the AutoSize attribute is set to be true, and the font size is set to be the font size in the step 1; then the word to be converted is displayed on a Label Label; putting a Label Label on a Picture, obtaining the RGB value of the (x, y) coordinate point by a Picture.Point (x, y) method, if the value is 0, indicating that the RGB value is a dot matrix on the word, calculating the size of a byte array according to the position of the byte, wherein V1 = V1 + 2 ^ (x), the lower bit is before and the higher bit is after;
and step 3: by a determinant scanning mode, scanning lines firstly, taking 8 points as a unit, scanning from left to right and from top to bottom, scanning low bits firstly and then scanning high bits, storing the 8 points as a byte into a byte array, scanning all character sets to obtain a dot matrix of the character, and then storing the dot matrix of the character into a dat file.
When the method is used, 0x3000 is subtracted from the Unicode code of the character to obtain the position of the character in the dat file, and then the dot matrix of the character is read out, so that the method can be directly used, and is convenient and quick.
Finally, it should be noted that the above examples are only used to illustrate the technical solutions of the present invention and not to limit the same; although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art will understand that: modifications to the specific embodiments of the invention or equivalent substitutions for parts of the technical features may be made; without departing from the spirit of the present invention, it is intended to cover all aspects of the invention as defined by the appended claims.

Claims (1)

1. A character library lattice generation method based on a generator set controller is characterized by comprising the following steps:
step 1: determining the font and the size of a character library to be generated, wherein the size is the number of data bits occupied by the dot matrix of each character;
step 2: firstly, a Picture control is newly built, a Label is newly built on the Picture control, wherein the position of the Label is set to be (0, 0), the AutoSize attribute is set to be true, and the font size is set to be the font size in the step 1; then the word to be converted is displayed on a Label Label; putting a Label Label on a Picture, obtaining the RGB value of the (x, y) coordinate point by a Picture.Point (x, y) method, if the value is 0, indicating that the RGB value is a dot matrix on the word, calculating the size of a byte array according to the position of the byte, wherein V1 = V1 + 2 ^ (x), the lower bit is before and the higher bit is after;
and step 3: obtaining a dot matrix of the character in a determinant scanning mode, and storing the dot matrix into a dat file;
the determinant scanning mode is as follows: scanning lines, taking 8 points as a unit, scanning from left to right and from top to bottom, scanning low order and then high order, storing the 8 points as a byte into a byte array, scanning all character sets to obtain a dot matrix of the character, and then storing the dot matrix of the character into a dat file;
when the method is used, subtracting 0x3000 from the Unicode code of the character to obtain the position of the character in the dat file, and then reading the lattice of the character.
CN201610775819.4A 2016-08-31 2016-08-31 Character library lattice generation method based on generator set controller Active CN106406561B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610775819.4A CN106406561B (en) 2016-08-31 2016-08-31 Character library lattice generation method based on generator set controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610775819.4A CN106406561B (en) 2016-08-31 2016-08-31 Character library lattice generation method based on generator set controller

Publications (2)

Publication Number Publication Date
CN106406561A CN106406561A (en) 2017-02-15
CN106406561B true CN106406561B (en) 2020-05-19

Family

ID=58003297

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610775819.4A Active CN106406561B (en) 2016-08-31 2016-08-31 Character library lattice generation method based on generator set controller

Country Status (1)

Country Link
CN (1) CN106406561B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107479433B (en) * 2017-07-17 2019-08-30 郑州众智科技股份有限公司 A kind of generation method based on the customized theme of generator set controller
CN107492354B (en) * 2017-07-31 2020-11-06 郑州众智科技股份有限公司 Dot matrix liquid crystal generator set controller-based multi-language implementation method
CN109086256B (en) * 2018-07-12 2022-08-26 郑州众智科技股份有限公司 Method for generating and using variable-length word stock dot matrix

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101008939A (en) * 2007-01-25 2007-08-01 深圳创维-Rgb电子有限公司 Implementation method of dot matrix word library of embedded system
US7475824B2 (en) * 2003-03-17 2009-01-13 Kenji Yoshida Information input/output method using dot pattern
CN101968814A (en) * 2010-10-29 2011-02-09 四川长虹电器股份有限公司 Dot matrix font manufacturing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7475824B2 (en) * 2003-03-17 2009-01-13 Kenji Yoshida Information input/output method using dot pattern
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 (2)

* Cited by examiner, † Cited by third party
Title
从国标字库中提取汉字点阵信息的方法及应用;黄永顺;《漳州师范学院学报(自然科学版)》;20040331;第17卷(第1期);第48-50页 *
用于嵌入式系统的汉字点阵提取方法;王诗彬等;《用于嵌入式系统的汉字点阵提取方法》;20070730;第162-165页 *

Also Published As

Publication number Publication date
CN106406561A (en) 2017-02-15

Similar Documents

Publication Publication Date Title
CN106406561B (en) Character library lattice generation method based on generator set controller
US4990903A (en) Method for storing Chinese character description information in a character generating apparatus
CN113138961B (en) File conversion method applied to OCT image, electronic device and storage medium
CN109086256B (en) Method for generating and using variable-length word stock dot matrix
CN106326194A (en) Directory generation method and apparatus applied to file format conversion scene
CN109933324A (en) A kind of nuclear power DCS man-machine interface automatic generation method
CN109257549B (en) Device and method for displaying OTP state in real time on liquid crystal module
CN104851333A (en) Copybook generating device and copybook imitating device equipped with same
CN116384356B (en) Method, device, equipment and medium for creating form row of OFD file
CN105242895B (en) A kind of dot matrix character display methods and device
KR102287149B1 (en) Electronic device that displays a separation line of a paragraph based on text line information in a pdf document and operating method thereof
CN103186507B (en) Dot matrix word library processing method
CN108595396B (en) Automatic resume generation method and terminal
CN103489268B (en) A kind of Arabic display packing for POS platform
WO2016180012A1 (en) Character display control method, device and ultra-thin card device and card body
CN113326677B (en) Subtitle rendering method and device, equipment and computer readable storage medium
CN106844559B (en) Dot matrix word stock generation method, query method and corresponding devices
CN104794134A (en) Chinese character display method and device
JP2014078168A (en) Character recognition apparatus and program
CN106776489B (en) Electronic document display method and system of display device
CN106802796B (en) Image-text mixed arranging method and system based on IOS system
CN118172448B (en) Data processing method and device, electronic equipment and storage medium
CN204242590U (en) The cloud memory device of a kind of public security bureau case file data management
JPH042958B2 (en)
JP5560990B2 (en) Bitmap data processing device, terminal device, bitmap data acquisition method and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant