CN110852037B - Picture word stock calling method - Google Patents

Picture word stock calling method Download PDF

Info

Publication number
CN110852037B
CN110852037B CN201910883489.4A CN201910883489A CN110852037B CN 110852037 B CN110852037 B CN 110852037B CN 201910883489 A CN201910883489 A CN 201910883489A CN 110852037 B CN110852037 B CN 110852037B
Authority
CN
China
Prior art keywords
characters
color
word stock
character
data
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
CN201910883489.4A
Other languages
Chinese (zh)
Other versions
CN110852037A (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.)
Konfoong Biotech International Co Ltd
Original Assignee
Konfoong Biotech International 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 Konfoong Biotech International Co Ltd filed Critical Konfoong Biotech International Co Ltd
Priority to CN201910883489.4A priority Critical patent/CN110852037B/en
Publication of CN110852037A publication Critical patent/CN110852037A/en
Application granted granted Critical
Publication of CN110852037B publication Critical patent/CN110852037B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention discloses a method for extracting a picture word stock, which comprises the following steps: defining an array through the header file as a data positioning chart of the character; obtaining coordinates according to the positions of the characters in a picture word stock, and extracting positioning data of a corresponding range in the data positioning chart according to the coordinates; defining a color formula of the points, and obtaining the color of each point according to the color formula; the colored characters are extracted by making the point set of the characters in the positioning data range, a data positioning chart is established to conveniently position the characters in the picture character library, then the characters needing to be discolored are dyed according to the positioning coordinates and the color formula, the character positioning is accurate, the dyeing is simple and quick, the fonts and the pictures in the picture character library are presented on the LCD display screen in color, the appearance is more attractive, and the design requirements of modern medical instruments are met.

Description

Picture word stock calling method
Technical Field
The invention relates to the field of computer word stock processing, in particular to a method for calling a picture word stock.
Background
The word stock is a Chinese vocabulary, is an electronic word font set stock of foreign fonts, chinese fonts and related characters, and is widely used in computers, networks and related electronic products.
In embedded systems, when LCD display is required, the prior art generally uses word stock software to generate a dot matrix word stock or uses the word stock of the operating system itself to display. The dot matrix word stock is displayed as a dot matrix font, and the edges can have saw-tooth phenomenon, which is unfavorable for beauty and the display of the edge word stock is not clear enough.
Disclosure of Invention
The invention aims to provide a method for calling a picture word stock, which solves the technical problems.
The technical problems solved by the invention can be realized by adopting the following technical scheme:
a method for calling a picture word stock comprises the following steps:
s100, defining an array through a header file, and taking the array as a data positioning chart of characters;
s200, obtaining coordinates according to the positions of the characters in a picture word stock, and extracting positioning data of a corresponding range in the data positioning chart according to the coordinates;
s300, defining a color formula of each point, and obtaining the color of each point according to the color formula;
s400, obtaining colored characters by making point sets of the characters in the positioning data range, and extracting the colored characters.
Preferably, each set of said positioning data in said data positioning chart corresponds to each said character.
Preferably, the color formula is:
C=(A*D+B*(256-D))/256;
c is the color value of the point, A is the preset color value of the character, B is the background color value of the picture word stock, and D is the color depth value.
Preferably, the color depth value is taken from a color value of any one color in the data location chart.
Preferably, the step of making the picture word stock includes:
s010, defining a rectangular window through drawing software;
s020, inputting all characters into a rectangular window in sequence;
s030, saving a picture word stock formed by the rectangular window and the characters as a BMP file in a 24-bit bitmap format;
s040, converting the BMP file into a BIN file through modular software.
Preferably, the rectangular window is used to accommodate all the characters.
Preferably, the background color of the rectangular window is black, and the color of the character is white.
Preferably, the heights of all the characters are equal, and the intervals between adjacent characters are equal.
Preferably, the character input step is as follows:
s021, starting from the left upper end of the rectangular window, and sequentially inputting the characters from left to right;
s022, starting to input the characters from the leftmost side of the rectangular window of the second row after the characters in the first row are input, and inputting the characters in the second row from left to right again;
s023, the character input principle of each row is from left to right, and the next row is started after the character input of each row is finished until all the characters are input.
The beneficial effects are that: the method has the advantages that the data positioning chart is built, the characters in the picture character library are conveniently positioned, then the characters needing to be discolored are dyed according to the positioning coordinates and the color formula, the character positioning is accurate, the dyeing is simple and quick, the fonts and the pictures in the picture character library are displayed on the LCD display screen in color, the appearance is more attractive, the design requirements of modern medical instruments are met, and important fonts are highlighted and dyed more clearly.
Drawings
FIG. 1 is a flow chart of a method for retrieving a picture word stock according to the present invention;
FIG. 2 is a flowchart of a method for making a picture word stock according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other.
The invention is further described below with reference to the drawings and specific examples, which are not intended to be limiting.
As shown in fig. 1, the invention provides a method for retrieving a picture word stock, which comprises the following steps:
s100, defining an array through a header file, and taking the array as a data positioning chart of characters;
s200, obtaining coordinates according to the positions of the characters in the picture word stock, and extracting positioning data of a corresponding range in the data positioning chart according to the coordinates;
s300, defining a color formula of the point, and obtaining the color of each point according to the color formula;
s400, extracting colored characters by using a point set of characters in a positioning data range.
The method for calling the picture word stock has the following advantages:
the method has the advantages that the data positioning chart is built, the characters in the picture character library are conveniently positioned, then the characters needing to be discolored are dyed according to the positioning coordinates and the color formula, finally the dyed characters are extracted, important fonts are highlighted and dyed, the characters are clearer, the character positioning is accurate, the dyeing is simple and quick, the fonts and the pictures in the picture character library are displayed on the LCD display screen in color, the appearance is attractive, and the design requirements of modern medical instruments are met.
As a preferred embodiment of the present invention, each set of positioning data in the data positioning chart corresponds to each character. The positioning array is convenient to use to position any character in the picture character library, and subsequent dyeing operation is convenient.
As a preferred embodiment of the present invention, the color formula is:
C=(A*D+B*(256-D))/256;
c is the color value of the point, A is the color value of the preset character, B is the background color value of the picture word stock, and D is the color depth value. And defining a color calculation formula, and providing a basis for the color and the color depth of the point.
As a preferred embodiment of the present invention, the color depth value is taken from the color value of any one color in the data location chart. The color depth value D may determine the color depth of the point.
Specifically, the use method of the picture word stock is summarized as follows: converting the picture word stock into BIN file and storing in FLASH (FLASH is the most common file system storage medium of embedded system), confirming the positioning data according to the character position, taking out the positioning data according to the requirement, and then marking out a series of color points, combining into the required colored characters and displaying on LCD.
Specifically, as shown in fig. 2, the color of the words in the third column of the first row in the picture word stock needs to be changed, and the character size is 20×20, the corresponding positioning data X40. 60 in the data positioning chart is first fetched, Y0.20, all data within this range were extracted, the combination of points consisting of data in these ranges is the desired character. When the data picture is in RGB24 format, the picture information is stored in a manner of r=8, g=8, and b=8, and the numerical value of any one color is taken as the color depth value D to be displayed.
Assuming that the color of the character to be displayed is a, the background color of the rectangular window is B, the positioning data XY 0 of the character as described above. Dotting within the range of 20] [ 0...20 ], the MCU calculates the color of each point according to the color formula of the point, so that each proposed character and rectangular window are dyed, and the picture word stock is colorized and polychromatic, so that the picture word stock is more attractive.
As shown in fig. 2, as a preferred embodiment of the present invention, the steps for making the photo word stock include:
s010, defining a rectangular window through drawing software;
s020, inputting all characters into the rectangular window in sequence;
s030, saving a picture word stock formed by a rectangular window and characters as a BMP file in a 24-bit bitmap format;
s040, converting the BMP file into a BIN file through a modular software.
Preferably, the size of the rectangular window is defined according to the sizes of all the characters, so that the size is fully utilized, the storage space of the picture word stock is saved maximally, and the pictures stored into the 24-bit bitmap format facilitate the color change of the subsequent picture word stock. The picture word stock is simple to manufacture, high in efficiency and flexible, fonts and the size of the word stock can be defined according to requirements, the occupied storage space is small, and no support of any operating system is needed, so that the embedded system can manufacture the picture word stock, and the applicability is wide.
As a preferred embodiment of the present invention, a rectangular window is used to accommodate all characters. Specifically, for example, the character size is 20×20, and the total number of characters is 100, the size of the rectangular window may be designed to be 200×200, and the character size coincides with the size unit of the rectangular window. That is, the size of the rectangular window is not smaller than the occupied size of all the characters after being arranged, so that all the characters are ensured to be in the rectangular window. The size of the rectangular window is the same as the total size of all characters, the space of the rectangular window is greatly utilized, and the storage space of a picture word stock is saved.
As a preferred embodiment of the present invention, the background color of the rectangular window is black, and the color of the character is white. The method is convenient for dyeing characters and background colors.
As a preferred embodiment of the present invention, all characters are equal in height and the interval between adjacent characters is equal. The typesetting of the characters is more regular, and other character spaces are not occupied, so that the positioning of the characters is more accurate.
As a preferred embodiment of the present invention, the character input steps are:
s021, starting from the left upper end of the rectangular window, and sequentially inputting characters from left to right;
s022, starting to input from the leftmost side of the rectangular window of the second row after the first row of characters are input, and inputting the second row of characters from left to right again;
s023, the character input principle of each row is from left to right, and the next row is started after the character input of each row is finished, until all characters are input.
Preferably, each character is sequentially input, so that the subsequent characters can be conveniently searched and positioned, and each character can be conveniently filled in the corresponding space position.
As a preferred embodiment of the present invention, the first character of each row is aligned with the left side of the rectangular window and the last character of each row is aligned with the right side of the rectangular window. The space of the rectangular window is greatly utilized, and the storage capacity of the picture word stock is saved.
The foregoing description is only illustrative of the preferred embodiments of the present invention and is not to be construed as limiting the scope of the invention, and it will be appreciated by those skilled in the art that equivalent substitutions and obvious variations may be made using the description and illustrations of the present invention, and are intended to be included within the scope of the present invention.

Claims (8)

1. The method for calling the picture word stock is characterized by comprising the following steps:
s100, defining an array through a header file, wherein the sequence of data input by the array is consistent with the sequence of data input by a word stock, and the array is used as a data positioning chart of characters;
s200, calculating the coordinate position of the character in the word stock according to the position of the character in the array of the header file, and extracting positioning data of a corresponding range in the data positioning chart according to the coordinate position;
s300, defining a color formula of each point, and obtaining the color of each point according to the color formula;
s400, obtaining colored characters by making a point set of the characters in the positioning data range, and extracting the colored characters;
the color formula is:
C=(A*D+B*(256-D))/256;
c is the color value of the point, A is the preset color value of the character, B is the background color value of the picture word stock, and D is the color depth value.
2. The method of claim 1, wherein each set of said positioning data in said data positioning chart corresponds to each of said characters.
3. The method according to claim 1, wherein the color depth value is obtained from a color value of any color in the data location chart.
4. The method for retrieving a picture word stock according to claim 1, wherein the step of creating the picture word stock comprises:
s010, defining a rectangular window through drawing software;
s020, inputting all characters into a rectangular window in sequence;
s030, saving a picture word stock formed by the rectangular window and the characters as a BMP file in a 24-bit bitmap format;
s040, converting the BMP file into a BIN file through modular software.
5. The method of claim 4, wherein the rectangular window is used to accommodate all of the characters.
6. The method for retrieving a picture word stock as claimed in claim 4, wherein the background color of the rectangular window is black, and the color of the character is white.
7. The method of claim 4, wherein the height of all the characters is equal, and the intervals between adjacent characters are equal.
8. The method for retrieving a picture word stock according to claim 4, wherein the step of inputting the character comprises:
s021, starting from the left upper end of the rectangular window, and sequentially inputting the characters from left to right;
s022, starting to input the characters from the leftmost side of the rectangular window of the second row after the characters in the first row are input, and inputting the characters in the second row from left to right again;
s023, the character input principle of each row is from left to right, and the next row is started after the character input of each row is finished until all the characters are input.
CN201910883489.4A 2019-09-18 2019-09-18 Picture word stock calling method Active CN110852037B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910883489.4A CN110852037B (en) 2019-09-18 2019-09-18 Picture word stock calling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910883489.4A CN110852037B (en) 2019-09-18 2019-09-18 Picture word stock calling method

Publications (2)

Publication Number Publication Date
CN110852037A CN110852037A (en) 2020-02-28
CN110852037B true CN110852037B (en) 2023-10-10

Family

ID=69595479

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910883489.4A Active CN110852037B (en) 2019-09-18 2019-09-18 Picture word stock calling method

Country Status (1)

Country Link
CN (1) CN110852037B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983239A (en) * 2006-04-06 2007-06-20 华为技术有限公司 Method and system for inputting and displaying character
CN101873451A (en) * 2010-05-19 2010-10-27 杭州海康威视数字技术股份有限公司 Method and device for realizing on-screen display (OSD) of characters
CN102169423A (en) * 2010-02-26 2011-08-31 腾讯科技(北京)有限公司 Method and system for displaying characters
CN202929611U (en) * 2012-10-15 2013-05-08 深圳市视得安罗格朗电子股份有限公司 Multi-language configuration display device
CN103488711A (en) * 2013-09-09 2014-01-01 北京大学 Method and system for fast making vector font library
CN104424163A (en) * 2013-08-29 2015-03-18 北大方正集团有限公司 Word processing method and system
CN106569984A (en) * 2015-10-10 2017-04-19 北京新美互通科技有限公司 Method, apparatus, and system for generating and transmitting color word stock automatically
CN108170649A (en) * 2018-01-26 2018-06-15 广东工业大学 A kind of Hanzi font library generation method and device based on DCGAN depth networks
CN109375962A (en) * 2018-10-23 2019-02-22 北京计算机技术及应用研究所 The implementation method of chinese character mixing output display based on embedded OS

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937312B (en) * 2010-09-15 2014-03-19 中兴通讯股份有限公司 Method for marking electronic book and mobile terminal

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983239A (en) * 2006-04-06 2007-06-20 华为技术有限公司 Method and system for inputting and displaying character
CN102169423A (en) * 2010-02-26 2011-08-31 腾讯科技(北京)有限公司 Method and system for displaying characters
CN101873451A (en) * 2010-05-19 2010-10-27 杭州海康威视数字技术股份有限公司 Method and device for realizing on-screen display (OSD) of characters
CN202929611U (en) * 2012-10-15 2013-05-08 深圳市视得安罗格朗电子股份有限公司 Multi-language configuration display device
CN104424163A (en) * 2013-08-29 2015-03-18 北大方正集团有限公司 Word processing method and system
CN103488711A (en) * 2013-09-09 2014-01-01 北京大学 Method and system for fast making vector font library
CN106569984A (en) * 2015-10-10 2017-04-19 北京新美互通科技有限公司 Method, apparatus, and system for generating and transmitting color word stock automatically
CN108170649A (en) * 2018-01-26 2018-06-15 广东工业大学 A kind of Hanzi font library generation method and device based on DCGAN depth networks
CN109375962A (en) * 2018-10-23 2019-02-22 北京计算机技术及应用研究所 The implementation method of chinese character mixing output display based on embedded OS

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
万伟,等.矢量字库在嵌入式机顶盒中的应用.《应用天地》.2004,53-56. *
基于Windows字库的点阵数据提取方法;霍艳忠;牛国玲;郑永春;张天顺;;云南农业大学学报(第04期);626-629 *
杨立身 ; 张安伟 ; 王磊 ; 魏兰 ; .基于STM32的μC/GUI外置spi flash字库研究与实现.液晶与显示.2015,(第02期),290-295. *
陈祥光.专用汉字库在仿真系统中的应用.计算机仿真.1994,(第04期),39-44. *

Also Published As

Publication number Publication date
CN110852037A (en) 2020-02-28

Similar Documents

Publication Publication Date Title
CN100498927C (en) Dot-character retracting method in two-dimension pattern engines and Chinese processing method
JP2014522048A (en) Kanji composition method and apparatus, character composition method and apparatus, and font library construction method
CN108710601B (en) Text display method and equipment, storage medium and electronic equipment
US20060181532A1 (en) Method and system for pixel based rendering of multi-lingual characters from a combination of glyphs
CN110705503B (en) Method and device for generating directory structured information
CN112380824B (en) PDF document processing method, device, equipment and storage medium for automatically identifying columns
US11741648B2 (en) Element rendering method and apparatus, computer readable storage medium, and computer device
CN108595396B (en) Automatic resume generation method and terminal
CN110852037B (en) Picture word stock calling method
US8824806B1 (en) Sequential digital image panning
US20020085018A1 (en) Method for reducing chinese character font in real-time
US7701467B2 (en) Character display apparatus, character display method, character display program, and recording medium
US20100302251A1 (en) Structure of animation font file and text displaying method of handheld terminal
CN116311300A (en) Table generation method, apparatus, electronic device and storage medium
KR20110021714A (en) Method and apparatus for the page-by-page provision of an electronic document as a computer graphic
CN115423901A (en) Method and device for drawing canvas based on json segment
CN111178002A (en) Character display method, system and device
CN101131687A (en) Method for generating font
US20130063475A1 (en) System and method for text rendering
KR20080110485A (en) Sign presentation device, printer, sign presentation method, pont database, storage medium
US20090009519A1 (en) Specifying Wildcard Characters for Priority in XLFD At Font Set Creation
CN110223217A (en) A kind of planar design automatic addition decorative element information processing system and method
US20100115404A1 (en) Automatic word string arranging apparatus and method thereof
CN106802800A (en) The generation method and display device of graphical interfaces
CN113497964B (en) Display method of local light control, storage medium and intelligent television

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Wang Kehui

Inventor after: Lu Wenjie

Inventor after: Liu Bingxian

Inventor after: Xie Juyuan

Inventor after: Wang Yanhui

Inventor after: Shen Bailiang

Inventor before: Liu Bingxian

Inventor before: Xie Juyuan

Inventor before: Wang Yanhui

Inventor before: Wang Kehui

Inventor before: Shen Bailiang

GR01 Patent grant
GR01 Patent grant