CN106844559A - A kind of dot matrix word library generation method, querying method and corresponding device - Google Patents
A kind of dot matrix word library generation method, querying method and corresponding device Download PDFInfo
- Publication number
- CN106844559A CN106844559A CN201611267579.3A CN201611267579A CN106844559A CN 106844559 A CN106844559 A CN 106844559A CN 201611267579 A CN201611267579 A CN 201611267579A CN 106844559 A CN106844559 A CN 106844559A
- Authority
- CN
- China
- Prior art keywords
- character
- index information
- dot matrix
- library
- word library
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/51—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/58—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F16/5866—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, manually generated location and time information
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2216/00—Indexing scheme relating to additional aspects of information retrieval not explicitly covered by G06F16/00 and subgroups
- G06F2216/01—Automatic library building
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Library & Information Science (AREA)
- Software Systems (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The invention discloses a kind of dot matrix word library generation method, querying method and corresponding device.The method includes:Vector fonts is converted into bitmap set and character index file;The character index file includes the index information of all characters;According to the secondary index information of the character index file generated dot matrix word library;All characters are divided into multiple subregions by the single code according to character, and the single code of the character in each subregion is continuous, structure the information only single code and the single code of termination character including beginning character of each subregion;The structure information of all subregions is merged the one-level index information of generation dot matrix word library;According to the one-level index information and secondary index information generation dot character library file head;File header, the one-level index information, the secondary index information and the sets of bit-maps symphysis into dot matrix word library according to the dot matrix word library.The present invention can reduce system resource energy consumption, accelerate the inquiry velocity of dot matrix word library, strengthen Consumer's Experience.
Description
Technical field
The present invention relates to field of computer technology, more particularly to dot matrix word library generation method, querying method and corresponding dress
Put.
Background technology
With the continuous improvement of people's living standard, people propose higher to the display function of embedded electronic product
It is required that.Vector fonts has compared to raster font can infinitely be amplified and distortionless advantage, but what vector fonts was included
Information is more, and the space of occupancy is big, and the speed of display is slow, and the system resource of most of embedded electronic product has relatively
Limit, causes vector fonts not to be widely used in embedded electronic product.Make vector fonts on dot matrix screen
Display has become the research emphasis of research staff.
But that existing dot matrix word library can only be realized is accurate, quickly show English character, because for an English character library
For, index information is also small comprising number of characters seldom.And a kind of character that vector fonts is included is tens of thousands of, the index information of character library
Amount is very big.When host computer is write a program, because the internal memory of computer is very big, drawback is not reflected;But on the mobile apparatus,
Due to limited memory, if directly invoking these index informations, it will cause the Out of Memory of microprocessor to be used, brought to project
Risk, so real-time, the quick display of vector fonts cannot be realized so far.
The content of the invention
The invention provides a kind of dot matrix word library generation method, querying method and corresponding device, to solve prior art
In cannot be by vector fonts in dot matrix screen display, and system resource loss is serious in character library Index process, leads to not
Accurately and rapidly inquire about the problem of Dot Matrix Library information.
According to an aspect of the invention, there is provided a kind of dot matrix word library generation method, the method includes:
Vector fonts is converted into bitmap set and character index file;The character index file includes all characters
Index information, the index information of each character includes the single code of the character;
According to the secondary index information of the character index file generated dot matrix word library;
All characters are divided into multiple subregions by the single code according to character, and the single code of the character in each subregion connects
It is continuous, structure the information only single code and the single code of termination character including beginning character of each subregion;By the knot of all subregions
Structure body information merges the one-level index information of generation dot matrix word library;
According to the one-level index information and secondary index information generation dot character library file head;
File header, the one-level index information, the secondary index information and the bitmap according to the dot matrix word library
Set generation dot matrix word library.
According to another aspect of the present invention, there is provided a kind of dot matrix word library querying method, the method includes:
The dot matrix word library of the method generation of generation dot matrix word library as described above is stored in external memory storage;
The start address of the one-level index information in dot character library file head, by the institute in the dot matrix word library
One-level index information is stated to be read into internal memory;
According to the single code of character to be checked, inquiry is read into the one-level index information in internal memory, obtain described in treat
Subregion where polling character, the single code and the single code of termination character of the beginning character according to place subregion calculate described to be checked
Ask district location of the character in place subregion;
The start address of the secondary index information in dot character library file head, inquiry storage is in external memory storage
In the secondary index information, according to the character to be checked in the district location of place subregion, obtain the word to be checked
The secondary index information of symbol;
According to the secondary index information of the character to be checked, the bitmap set is inquired about, obtain the character to be checked
Bitmap.
According to a further aspect of the invention, there is provided a kind of dot matrix word library generating means, the device includes:
Vector fonts converting unit, is suitable to for vector fonts to be converted into bitmap set and character index file;The character
Index file includes the index information of all characters, and the index information of each character includes the single code of the character;
Secondary index information generating unit, is suitable to be believed according to the secondary index of the character index file generated dot matrix word library
Breath;
One-level index information generation unit, is suitable to all characters are divided into multiple subregions according to the single code of character, is in
The single code of the character in each subregion is continuous, and the structure information of each subregion only includes single code and the end of beginning character
The single code of character;The structure information of all subregions is merged the one-level index information of generation dot matrix word library;
Dot character library file head generation unit, is suitable to be generated according to the one-level index information and the secondary index information
Dot character library file head;
Dot Matrix Library generation unit, be suitable to file header according to the dot matrix word library, the one-level index information, described two grades
Index information and the sets of bit-maps symphysis into dot matrix word library.
According to a further aspect of the invention, there is provided a kind of dot matrix word library inquiry unit, the device includes:
External memory unit, is suitable to the dot matrix word library storage of the device generation of generation dot matrix word library as described above outside
In portion's memory;
Internal memory reads in unit, is suitable to the start address of the one-level index information in dot character library file head, will
The one-level index information in the dot matrix word library is read into internal memory;
One-level search index unit, is suitable to the single code according to character to be checked, and inquiry is read into described in internal memory
Level index information, obtains subregion where the character to be checked, the single code and end word of the beginning character according to place subregion
Accord with single code and calculate district location of the character to be checked in place subregion;
Secondary index query unit, is suitable to the beginning ground of the secondary index information in dot character library file head
Location, the inquiry secondary index information of the storage in external memory storage, according to the character to be checked place subregion point
Zone position, obtains the secondary index information of the character to be checked;
Bitmap acquiring unit, is suitable to the secondary index information according to the character to be checked, inquires about the bitmap set, obtains
Take the bitmap of the character to be checked.
Beneficial effects of the present invention:
Dot matrix library generating method of the invention, first, bitmap set and character index file is converted into by vector fonts;So
Afterwards, according to the secondary index information of character index file generated dot matrix word library, and all characters are divided according to the single code of character
Into multiple subregions, the few one-level index of generation information contained amount, and then according to one-level index information, secondary index information and position
Set of graphs generates dot matrix word library.The generation of the Dot Matrix Library based on vector fonts is the method achieve, while ensure that in index word
System energy consumption can be reduced during storehouse.
Dot Matrix Library querying method of the invention, the dot matrix word library that will be generated is stored in external memory storage.In dot matrix word library
In Index process, only the few one-level index of information content is read into internal memory, greatly reduces the resource energy consumption of system;Simultaneously
By the single code of character, it is possible to store the secondary index information of the character in external memory storage by one-level search index,
Secondary index information according to the character just can realize the lattice display of vector fonts with the lattice information of polling character, accelerate
The inquiry velocity of dot matrix word library, enhances Consumer's Experience.
In sum, dot matrix library generating method of the present invention and Dot Matrix Library querying method, realize the point based on vector fonts
The generation of battle array storehouse and the quick search of the dot matrix word library based on vector fonts, reduce system resource energy consumption, contribute to lifting to be embedded in
The performance of formula electronic product, in can be widely applied to the embedded electronic product of resource-constrained, wide market.
Brief description of the drawings
Fig. 1 is a kind of flow chart of dot matrix word library generation method of one embodiment of the invention;
Fig. 2 is an a kind of bitmap schematic diagram of vector fonts of one embodiment of the invention;
Fig. 3 is a kind of schematic diagram of the character index file of vector fonts of one embodiment of the invention;
Fig. 4 is a kind of schematic diagram of bitmap for inquiring certain character of one embodiment of the invention;
Fig. 5 is the schematic diagram of the secondary index of the dot matrix word library generation method generation of one embodiment of the invention;
Fig. 6 is the schematic diagram of the one-level index of the dot matrix word library generation method generation of one embodiment of the invention;
Fig. 7 is the signal of the file header of the dot matrix word library of the dot matrix word library generation method generation of one embodiment of the invention
Figure;
Fig. 8 is the schematic diagram of the file of the dot matrix word library of the dot matrix word library generation method generation of one embodiment of the invention;
Fig. 9 is a kind of flow chart of dot matrix word library querying method of one embodiment of the invention;
Figure 10 is a kind of schematic diagram of dot matrix word library generating means of one embodiment of the invention;
Figure 11 is a kind of Dot Matrix Library file header generation unit of dot matrix word library generating means of one embodiment of the invention
Schematic diagram;
Figure 12 is a kind of schematic diagram of the device of dot matrix word library inquiry of one embodiment of the invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention
Formula is described in further detail.
Integral Thought of the invention is:First, vector fonts is converted into bitmap set and character index file;Then,
According to the secondary index information of character index file generated dot matrix word library, and one-level rope is generated according to the single code of each character
Draw, and then according to one-level index information, secondary index information and sets of bit-maps symphysis into dot matrix word library, the dot-matrix stock that will be generated
Storage is in external memory storage.In dot matrix word library Index process, only one-level index is read into internal memory, greatly reduces system
Resource energy consumption;And, only it is to be understood that the single code of character, it is possible to believed by the secondary index of one-level search index character
Breath, the secondary index information according to the character just can realize the lattice display of vector fonts with the lattice information of polling character, plus
The fast inquiry velocity of dot matrix word library, enhances Consumer's Experience.
Embodiment one
Fig. 1 is a kind of flow chart of dot matrix word library generation method of one embodiment of the invention, referring to Fig. 1, the method bag
Include:
Step S110, bitmap set and character index file are converted into by vector fonts;The character index file includes
The index information of all characters, the index information of each character includes the single code of the character;
Step S120, according to the secondary index information of the character index file generated dot matrix word library;
All characters are divided into multiple subregions by step S130, the single code according to character, the character in each subregion
Single code it is continuous, structure the information only single code and the single code of termination character including beginning character of each subregion;By institute
The structure information for having subregion merges the one-level index information of generation dot matrix word library;
Step S140, according to the one-level index information and secondary index information generation dot character library file head;
Step S150, file header, the one-level index information, the secondary index information according to the dot matrix word library and
The sets of bit-maps symphysis is into dot matrix word library.
By the method shown in Fig. 1, the dot matrix word library of generation is realized only it is to be understood that the single code of character can just be inquired about
The lattice information of the character, carries out the lattice display of vector fonts, reduces the resource energy consumption of embedded system, accelerates dot matrix
The inquiry velocity of character library, enhances Consumer's Experience.
In one embodiment of the invention, in step s 110, the index information of each character is except including the word
Symbol single code, also including the page in character set of graphs in place, X-coordinate, Y-coordinate, width, height, X-axis skew, Y-axis skew and
The information of step value.
It should be noted which in character set of graphs in place what " page " in each character index information represented is
On Zhang Weitu, " X-coordinate and Y-coordinate " represents particular location of the character on this bitmap, and " width and height " represents the word
Accord with width and height on bitmap.Only it is to be understood that " page, X-coordinate, Y-coordinate, width, the height " of character, it is possible to which inquiry should
The bitmap of character.
As long as it follows that finding the index information of character, it is possible to find the bitmap of character, realizing the dot matrix of the character
It has been shown that, facilitates the inquiry of character.
To make the solution of the present invention clearer, illustrated with reference to a specific example.It is specific at one
In example, it is assumed that a kind of vector fonts is " Microsoft is refined black ", " Microsoft is refined black " is converted into bitmap set, and (Fig. 2 is bitmap set
In a schematic diagram for bitmap, then bitmap set includes multiple bitmaps as shown in Figure 2) and a character index file is (such as
Shown in Fig. 3), secondary index according to the character index file generated dot matrix word library, it is necessary to explanation, in character index file
Each record, be exactly an index information for character.The index information of each character includes single code, page, X-coordinate, Y
Coordinate, width, height, X-axis skew, Y-axis skew, step value.As shown in fig. 7, Fig. 5 is the dot-matrix of one embodiment of the invention
The schematic diagram of the secondary index of library generating method generation.
Fig. 6 is the schematic diagram of the one-level index of the dot matrix word library generation method generation of one embodiment of the invention, such as Fig. 6 institutes
Show, the single code of all characters in character index file is extracted, because very multicharacter single code is continuous, will
According to their single code division area, continuous single codeword symbol is an area to all of character.One point of adjacent all characters
Plot structure body is comprising the single code of beginning and terminates single code.All of partitioned organization body is combined, the one of character library is constituted
Level index.As can be seen here, the information content that one-level index information is included is considerably less, but is enough to according to a single code for character just
Particular location of the character in secondary index is may determine that, and then inquires about the secondary index information of the character.
Fig. 7 is the signal of the file header of the dot matrix word library of the dot matrix word library generation method generation of one embodiment of the invention
Figure, as shown in fig. 7, in step S140, in order in dot matrix word library Index process, accurately and rapidly one-level be indexed
It is read into internal memory, at the same for the secondary index information of accurately and rapidly polling character, when font file head is generated, will
The start address of one-level index information and the start address of secondary index information are deposited into the file header of dot matrix word library;And
Generate Dot Matrix Library file header when, the character library title and version information of dot matrix word library can be carried out it is self-defined, so as to generate a little
The file header in battle array storehouse.It follows that generation Dot Matrix Library file header is the inquiry of dot matrix word library for convenience, lifting dot matrix word library
Inquiry velocity.And for the character library title and version information of dot matrix word library, user can customize, the present invention is set to have more human nature
Change, improve Consumer's Experience.
Fig. 8 is the schematic diagram of the file of the dot matrix word library of the dot matrix word library generation method generation of one embodiment of the invention,
As shown in figure 8, character library dot array data is exactly the bitmap set of vector fonts generation, the dot character library file of generation includes dot-matrix
The file header in storehouse, one-level index information, secondary index information and bitmap set, wherein character library dot array data are exactly vector fonts life
Into bitmap set, the dot matrix word library that will be generated is stored in external memory storage, during dot matrix word library is indexed, only by one
It is the bitmap for finding character that level index reads in internal memory, so the dot matrix word library of generation has greatly saved system resource energy consumption, pole
It is suitably applied in the less embedded device of internal memory, is capable of achieving the inquiry of quick, accurate dot matrix word library, and then significantly carry
Rise the performance of embedded device.
Embodiment two
Fig. 9 is a kind of flow chart of dot matrix word library querying method of one embodiment of the invention, referring to Figure 11, the method bag
Include:
S910 steps, the dot matrix word library of the method generation of generation dot matrix word library as described above is stored in external memory storage
In;
S920 steps, the start address of the one-level index information in dot character library file head, by the dot matrix
The one-level index information in character library is read into internal memory;
S930 steps, according to the single code of character to be checked, inquiry is read into the one-level index information in internal memory, obtains
Subregion where the character to be checked is taken, the single code and the single code of termination character of the beginning character according to place subregion are calculated
District location of the character to be checked in place subregion;
S940 steps, the start address of the secondary index information in dot character library file head, inquiry storage exists
The secondary index information in external memory storage, according to the character to be checked in the district location of place subregion, obtains institute
State the secondary index information of character to be checked;
S950 steps, according to the secondary index information of the character to be checked, inquire about the bitmap set, obtain described in treat
The bitmap of polling character.
It follows that the dot matrix word library of above-mentioned generation is stored in external memory storage, system resource energy consumption is reduced;And
And in dot matrix word library Index process, simply the one-level index comprising low volume data is read into internal memory, reduce further
System resource energy consumption, it is ensured that the quick operation of system;And only it is to be understood that the single code of character, it is possible to indexed by one-level
The secondary index information of polling character, the secondary index information according to the character can just be realized with the lattice information of polling character
The lattice display of vector fonts, accelerates the inquiry velocity of dot matrix word library, enhances Consumer's Experience.
To make the solution of the present invention clearer, illustrated with reference to a specific example.It is specific at one
In example, if a character is shown on screen, it is known that the single code of character is c, according to one-level index search to the word
The subregion of symbol is x, can first obtain position of the character in all characters.The position=the character of 1 number of characters of subregion+subregion 2
Number+...+subregion (x-1) number of characters+(c- subregions x starts single code).If to show character " H " on screen, it is known that " H "
Single code be 72, inquiry one-level index subregion include (32,35), (53,59), (67,74) and (81,84), find " H " and exist
3rd subregion of one-level index, then calculate the 17th position of " H " in secondary index, and inquiry storage is in external memory storage
In secondary index, inquire about " H " secondary index information be " charid=72x=62y=75width=14height=
24xoffset=0yoffset=0xadvance=14page=0chnl=15 ", by the secondary index information of " H ", wherein
" page=0 " illustrates " H " in bitmap 0_0.bmp (shown in Fig. 2), wherein, " x=62y=75 " expression " H " character is located at Fig. 2
In (62,75) position, the width in fig. 2 of " width=14height=24 " expression " H " character is 14, and height is 24,
According to these contents, it is possible to search character " H " from character library dot array data, secondary index remaining content is not examined temporarily
Consider.Fig. 2 is opened, using (62.75) in Fig. 2 as starting point, (62+14,75+24) cuts as this block length square region of terminal
(Fig. 4 is a kind of schematic diagram of bitmap for inquiring certain character of one embodiment of the invention) as shown in Figure 4 is taken out, is copied to
On screen, the lattice display of character " H " is realized.
Embodiment three
Figure 10 is a kind of schematic diagram of dot matrix word library generating means of one embodiment of the invention, referring to Figure 10, the device
1000 include:
Vector fonts converting unit 1010, is suitable to for vector fonts to be converted into bitmap set and character index file;It is described
Character index file includes the index information of all characters, and the index information of each character includes the single code of the character;
Secondary index information generating unit 1020, is suitable to two grades of ropes according to the character index file generated dot matrix word library
Fuse ceases;
One-level index information generation unit 1030, is suitable to all characters are divided into multiple subregions according to the single code of character,
The single code of the character in each subregion is continuous, single code only including beginning character of the structure information of each subregion and
The single code of termination character;The structure information of all subregions is merged the one-level index information of generation dot matrix word library;
Dot character library file head generation unit 1040, is suitable to according to the one-level index information and the secondary index information
Generation dot character library file head;
Dot Matrix Library generation unit 1050, is suitable to file header according to the dot matrix word library, the one-level index information, described
Secondary index information and the sets of bit-maps symphysis into dot matrix word library.
It should be noted that the index information of each character is except the single code including the character, also including institute
State the letter of page of the character in the bitmap set, X-coordinate, Y-coordinate, width, height, X-axis skew, Y-axis skew and step value
Breath.
In one embodiment of the invention, Figure 11 is a kind of dot matrix word library generating means of one embodiment of the invention
The schematic diagram of Dot Matrix Library file header generation unit, referring to Figure 11, the Dot Matrix Library file header generation unit 1100 includes:
Start address acquisition module 1110, is suitable to obtain the start address and the secondary index of the one-level index information
The start address of information;
Title and version acquisition module 1120, are suitable to obtain the character library title and version of the dot matrix word library that user determines
This information;
File header generation module 1130, is suitable to be opened based on the character library title, version information, the one-level index information
Beginning address and the secondary index information start address generation dot character library file head.
Wherein, the dot matrix word library of generation is applied in embedded device.
It should be noted that the course of work of the device of this generation dot matrix word library of the present embodiment is and foregoing generation point
The method of battle array character library realizes that step is corresponding, therefore, the specific works mistake of the device of the generation dot matrix word library of the present embodiment
Journey may refer to the related description of the method part of foregoing generation dot matrix word library, will not be repeated here.
Example IV
Figure 12 is a kind of schematic diagram of dot matrix word library inquiry unit of one embodiment of the invention, referring to Figure 12, the device
1200 include:
External memory unit 1210, is suitable to the dot matrix word library storage of the device generation of above-mentioned generation dot matrix word library outside
In portion's memory;
Internal memory reads in unit 1220, is suitable to the beginning ground of the one-level index information in dot character library file head
Location, the one-level index information in the dot matrix word library is read into internal memory;
One-level search index unit 1230, is suitable to the single code according to character to be checked, and inquiry is read into the institute in internal memory
One-level index information is stated, subregion, the single code and knot of the beginning character according to place subregion where the character to be checked is obtained
The single code of beam character calculates district location of the character to be checked in place subregion;
Secondary index query unit 1240, is suitable to the beginning of the secondary index information in dot character library file head
Address, the secondary index information of the inquiry storage in external memory storage, according to the character to be checked in place subregion
District location, obtains the secondary index information of the character to be checked;
Bitmap acquiring unit 1250, is suitable to the secondary index information according to the character to be checked, inquires about the sets of bit-maps
Close, obtain the bitmap of the character to be checked.
It should be noted that the course of work of the device of this inquiry dot matrix word library of the present embodiment is and foregoing query point
The method of battle array character library realizes that step is corresponding, therefore, the specific works mistake of the device of the inquiry dot matrix word library of the present embodiment
Journey may refer to the related description of the method part of foregoing inquiry dot matrix word library, will not be repeated here.
In sum, by dot matrix library generating method, first, vector fonts is converted into bitmap set and character index text
Part;Then, according to the secondary index information of character index file generated dot matrix word library, and according to the single code of character by all words
Symbol is divided into multiple subregions, and the single code of the character in each subregion is continuous, and the structure information of each subregion only includes opening
The single code of single code and termination character of beginning character, removes continuous single code in the middle of each partitioned organization body, so as to generate institute
Containing the few one-level index of information content, and then according to one-level index information, secondary index information and sets of bit-maps symphysis into dot-matrix
Storehouse.The generation of the Dot Matrix Library based on vector fonts is the method achieve, can reduce system when character library is indexed while ensure that
Energy resource consumption.
By Dot Matrix Library querying method, the dot matrix word library that will be generated is stored in external memory storage.In dot matrix word library index
During, only the few one-level index of information content is read into internal memory, greatly reduce the resource energy consumption of system;Pass through simultaneously
One single code of character, it is possible to the secondary index information of the character in external memory storage is stored by one-level search index,
Secondary index information according to the character just can realize the lattice display of vector fonts with the lattice information of polling character, accelerate
The inquiry velocity of dot matrix word library, enhances Consumer's Experience.
It follows that the dot matrix library generating method and Dot Matrix Library querying method of present invention design, realize based on vector font
The Dot Matrix Library generation of body and the quick search of the dot matrix word library based on vector fonts, reduce system energy consumption consumption, help to carry
The performance of embedded electronic product is risen, in can be widely applied to the embedded electronic product of resource-constrained, wide market.
Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent substitution and improvements made within the spirit and principles in the present invention etc., are all contained in protection scope of the present invention
It is interior.
Claims (10)
1. a kind of dot matrix word library generation method, it is characterised in that including:
Vector fonts is converted into bitmap set and character index file;The character index file includes the index of all characters
Information, the index information of each character includes the single code of the character;
According to the secondary index information of the character index file generated dot matrix word library;
All characters are divided into multiple subregions by the single code according to character, and the single code of the character in each subregion is continuous,
The structure information of each subregion only single code and the single code of termination character including beginning character;By the structure of all subregions
Information merges the one-level index information of generation dot matrix word library;
According to the one-level index information and secondary index information generation dot character library file head;
File header, the one-level index information, the secondary index information and the bitmap set according to the dot matrix word library
Generation dot matrix word library.
2. dot matrix word library generation method according to claim 1, it is characterised in that
The index information of each character except the single code including the character, also including the character in the sets of bit-maps
The information of the skew of page, X-coordinate, Y-coordinate, width, height, X-axis, Y-axis skew and step value in conjunction.
3. dot matrix word library generation method according to claim 2, it is characterised in that described according to the one-level index information
Include with secondary index information generation dot character library file head:
Obtain the start address of the one-level index information and the start address of the secondary index information;
Obtain the character library title and version information of the dot matrix word library that user determines;
Based on the character library title, version information, the start address of the one-level index information and the secondary index information
Start address generates dot character library file head.
4. dot matrix word library generation method according to claim 3, it is characterised in that the dot matrix word library of generation is applied to insertion
In formula equipment.
5. a kind of dot matrix word library querying method, it is characterised in that including:
The dot matrix word library of the dot matrix word library generation method generation described in claim 4 is stored in external memory storage;
The start address of the one-level index information in dot character library file head, by described in the dot matrix word library
Level index information is read into internal memory;
According to the single code of character to be checked, inquiry is read into the one-level index information in internal memory, obtains described to be checked
Subregion where character, the single code and the single code of termination character of the beginning character according to place subregion calculate the word to be checked
Accord with the district location in place subregion;
The start address of the secondary index information in dot character library file head, inquiry storage is in external memory storage
The secondary index information, according to the character to be checked in the district location of place subregion, obtains the character to be checked
Secondary index information;
According to the secondary index information of the character to be checked, the bitmap set is inquired about, obtain the position of the character to be checked
Figure.
6. a kind of dot matrix word library generating means, it is characterised in that including:
Vector fonts converting unit, is suitable to for vector fonts to be converted into bitmap set and character index file;The character index
File includes the index information of all characters, and the index information of each character includes the single code of the character;
Secondary index information generating unit, is suitable to the secondary index information according to the character index file generated dot matrix word library;
One-level index information generation unit, is suitable to all characters are divided into multiple subregions according to the single code of character, in each
The single code of the character in subregion is continuous, structure the information only single code and termination character including beginning character of each subregion
Single code;The structure information of all subregions is merged the one-level index information of generation dot matrix word library;
Dot character library file head generation unit, is suitable to according to the one-level index information and secondary index information generation dot matrix
Font file head;
Dot Matrix Library generation unit, is suitable to file header, the one-level index information, the secondary index according to the dot matrix word library
Information and the sets of bit-maps symphysis into dot matrix word library.
7. dot matrix word library generating means according to claim 6, it is characterised in that the index information of each character is removed
Single code including the character, also page, X-coordinate, Y-coordinate, width, the height including the character in the bitmap set
The information of degree, X-axis skew, Y-axis skew and step value.
8. dot matrix word library generating means according to claim 7, it is characterised in that the first-born Cheng Dan of dot character library file
Unit includes:
Start address acquisition module, is suitable to obtain the start address of the one-level index information and opening for the secondary index information
Beginning address;
Title and version acquisition module, are suitable to obtain the character library title and version information of the dot matrix word library that user determines;
File header generation module, be suitable to based on the character library title, version information, the start address of the one-level index information and
The start address generation dot character library file head of the secondary index information.
9. dot matrix word library generating means according to claim 8, it is characterised in that the dot matrix word library of generation is applied to insertion
In formula equipment.
10. a kind of dot matrix word library inquiry unit, it is characterised in that including:
External memory unit, is suitable to the dot matrix word library storage of the dot matrix word library generating means generation described in claim 9 outside
In portion's memory;
Internal memory reads in unit, is suitable to the start address of the one-level index information in dot character library file head, will be described
The one-level index information in dot matrix word library is read into internal memory;
One-level search index unit, is suitable to the single code according to character to be checked, and inquiry is read into the one-level rope in internal memory
Fuse ceases, and obtains subregion, the single code and termination character list of the beginning character according to place subregion where the character to be checked
One yard calculates district location of the character to be checked in place subregion;
Secondary index query unit, is suitable to the start address of the secondary index information in dot character library file head, looks into
Ask the secondary index information of the storage in external memory storage, according to the character to be checked place subregion zone bit
Put, obtain the secondary index information of the character to be checked;
Bitmap acquiring unit, is suitable to the secondary index information according to the character to be checked, inquires about the bitmap set, obtains institute
State the bitmap of character to be checked.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611267579.3A CN106844559B (en) | 2016-12-31 | 2016-12-31 | Dot matrix word stock generation method, query method and corresponding devices |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611267579.3A CN106844559B (en) | 2016-12-31 | 2016-12-31 | Dot matrix word stock generation method, query method and corresponding devices |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106844559A true CN106844559A (en) | 2017-06-13 |
CN106844559B CN106844559B (en) | 2020-08-14 |
Family
ID=59117336
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611267579.3A Active CN106844559B (en) | 2016-12-31 | 2016-12-31 | Dot matrix word stock generation method, query method and corresponding devices |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106844559B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111695327A (en) * | 2019-02-28 | 2020-09-22 | 珠海金山办公软件有限公司 | Method and device for repairing messy codes, electronic equipment and readable storage medium |
CN112395828A (en) * | 2020-12-18 | 2021-02-23 | 深圳高通半导体有限公司 | Recording method of dot matrix character library information and generating method of dot matrix character |
Citations (4)
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 |
JP2007322810A (en) * | 2006-06-01 | 2007-12-13 | Alpha Blend:Kk | Font database generating program and font data structure |
CN102750337A (en) * | 2012-06-01 | 2012-10-24 | 中国科学院声学研究所 | Producing method and device for font |
CN102799590A (en) * | 2011-05-26 | 2012-11-28 | 安凯(广州)微电子技术有限公司 | Embedded type electronic product word stock as well as word stock generating method and word stock searching method |
-
2016
- 2016-12-31 CN CN201611267579.3A patent/CN106844559B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007322810A (en) * | 2006-06-01 | 2007-12-13 | Alpha Blend:Kk | Font database generating program and font data structure |
CN101008939A (en) * | 2007-01-25 | 2007-08-01 | 深圳创维-Rgb电子有限公司 | Implementation method of dot matrix word library of embedded system |
CN102799590A (en) * | 2011-05-26 | 2012-11-28 | 安凯(广州)微电子技术有限公司 | Embedded type electronic product word stock as well as word stock generating method and word stock searching method |
CN102750337A (en) * | 2012-06-01 | 2012-10-24 | 中国科学院声学研究所 | Producing method and device for font |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111695327A (en) * | 2019-02-28 | 2020-09-22 | 珠海金山办公软件有限公司 | Method and device for repairing messy codes, electronic equipment and readable storage medium |
CN111695327B (en) * | 2019-02-28 | 2024-01-26 | 珠海金山办公软件有限公司 | Method and device for repairing messy codes, electronic equipment and readable storage medium |
CN112395828A (en) * | 2020-12-18 | 2021-02-23 | 深圳高通半导体有限公司 | Recording method of dot matrix character library information and generating method of dot matrix character |
Also Published As
Publication number | Publication date |
---|---|
CN106844559B (en) | 2020-08-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9690966B2 (en) | Two-dimensional code based information acquisition system and method thereof | |
US8910036B1 (en) | Web based copy protection | |
JP2006106729A (en) | Simplification of complex characters without impairing legibility | |
JP2005536783A (en) | Section extraction tool for pdf documents | |
JP2009009527A (en) | Image processor, image processing method, and computer program | |
CN106844559A (en) | A kind of dot matrix word library generation method, querying method and corresponding device | |
CN103559512B (en) | A kind of Text region output intent and system | |
EP1332467B1 (en) | Method and apparatus for composite font generation | |
CN108319578B (en) | Method for generating medium for data recording | |
KR20010102224A (en) | Apparatus and system for reproduction of handwritten input | |
CN112069991A (en) | PDF table information extraction method and related device | |
US8044960B2 (en) | Character display apparatus | |
CN113362420A (en) | Road marking generation method, device, equipment and storage medium | |
US6810147B2 (en) | Document image processing apparatus for processing line portions manually input to document image, method therefor, and computer readable recording medium recorded with document image processing program therefor | |
CN103761220B (en) | A kind of text composition technical method of information software | |
US20130332824A1 (en) | Embedded font processing method and device | |
US20080150768A1 (en) | Character Entry by Inputting Strokes Through a Circular Input Device | |
CN108874994A (en) | A kind of piecemeal reads the method, apparatus and computer storage medium of data | |
CN103491414B (en) | Method and device for processing character and set top box | |
CN109558113B (en) | Data field representation method and device and electronic equipment | |
US5923321A (en) | Structural graph display system | |
CN113988007A (en) | Text display method and device, electronic equipment and storage medium | |
CN113378526A (en) | PDF paragraph processing method, device, storage medium and equipment | |
JP2011040075A (en) | Image processing device, image processing method and computer program | |
EP2703958A1 (en) | Method and apparatus for optimizing handwriting input method |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |