CN102117266B - Method and device for processing character pitch - Google Patents

Method and device for processing character pitch Download PDF

Info

Publication number
CN102117266B
CN102117266B CN 200910217581 CN200910217581A CN102117266B CN 102117266 B CN102117266 B CN 102117266B CN 200910217581 CN200910217581 CN 200910217581 CN 200910217581 A CN200910217581 A CN 200910217581A CN 102117266 B CN102117266 B CN 102117266B
Authority
CN
China
Prior art keywords
character
dot matrix
width
array
byte
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.)
Expired - Fee Related
Application number
CN 200910217581
Other languages
Chinese (zh)
Other versions
CN102117266A (en
Inventor
丛玉孟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Aeonmed Co Ltd
Original Assignee
Beijing Aeonmed Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Aeonmed Co Ltd filed Critical Beijing Aeonmed Co Ltd
Priority to CN 200910217581 priority Critical patent/CN102117266B/en
Publication of CN102117266A publication Critical patent/CN102117266A/en
Application granted granted Critical
Publication of CN102117266B publication Critical patent/CN102117266B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Digital Computer Display Output (AREA)

Abstract

The invention provides a method and device for processing character pitch. The method comprises the following steps of: obtaining dot matrix widths of characters in a word bank file; calculating actual widths occupied by characters in a dot matrix; determining the dot matrix widths of the characters according to the actual widths of the characters and a required character pitch width; and displaying the characters according to the dot matrix widths of the characters. By obtaining the actual widths occupied by the characters in the corresponding dot matrix in the invention, the display pitch of the characters on a graphical interface is set on the basis of the occupied actual width thereof, thereby the problem of unequal widths of adjacent characters in the display of the graphical interface because the characters occupy different actual widths in the corresponding dot matrix can be solved, and better display effect is achieved.

Description

The disposal route of character pitch and device
Technical field
The present invention relates to character and show process field, the method and apparatus of handling in particular to a kind of demonstration of the character pitch to graphical interfaces.
Background technology
Current, on the display device such as equipment such as Anesthesia machines, graphical interfaces is when showing character information, and obtaining of character pattern data generally has two kinds of methods, a kind ofly be: the character pattern data with required demonstration character writes in the code in advance, press the character pattern data demonstration character in the code; Another kind is: read the character pattern data of respective symbols from ready-made font file, the dot matrix of pressing character pattern data then shows character.
The shortcoming of first method is to have increased size of code, and when needing to increase fresh character, also new character pattern data will be write in the code and recompilate; There is not the problem of first method in second method, but the dot matrix of the character pattern data correspondence of font file all is wide, if directly be used for showing, will cause the inconsistent problem of adjacent character spacing width.For example the type matrix of the letter " i " in the same font file and capitalization " W " is wide, but during actual displayed, " i " narrows down a lot than " W ", and then the spacing of " i " and adjacent character has so just influenced the display effect of character much larger than the spacing of " W " and adjacent character.
Summary of the invention
Technical matters to be solved by this invention provides a kind of disposal route and device of character pitch, can make the spacing width of the adjacent character that graphical interfaces shows in showing equate, to improve the display effect of character.
For solving the problems of the technologies described above, according to an aspect of the present invention, provide a kind of disposal route of character pitch, may further comprise the steps: S102, obtain the dot matrix width of character in font file; The developed width that S104, calculating character take in dot matrix; S106, the display width of determining character according to developed width and the required character pitch width of character; S108, the display width of pressing character shows character.
In the present invention, by obtaining character shared developed width in its corresponding dot matrix, according to shared developed width the demonstration spacing of character on graphical interfaces is set then, thereby can solve because character shared developed width difference in the dot matrix of correspondence, and cause the spacing width of adjacent character in graphical interfaces shows not wait, thereby influence the problem of the display effect of character.
Preferably, step S104 may further comprise the steps: the row that calculate dot matrix left pixel point are empty width entirely, and the row of dot matrix right pixel point are empty width entirely; The row that deduct dot matrix left pixel point respectively with the dot matrix width of character obtain character shared developed width in dot matrix for the width of sky entirely for the row of empty width and right pixel point entirely.
Preferably, the row of calculating dot matrix left side or right pixel point may further comprise the steps for empty width entirely: with the wide byte SerComm that is converted to of the pixel of dot matrix; The character pattern data of each byte of dot matrix being carried out inclusive-OR operation with the byte unit of classifying as, obtain a value, is that cycle index repeats aforesaid operations with the byte SerComm, stops cycling if income value is not 0, obtains a class value; Inquire about first array or second array as array index respectively with each value, array element in first array contains 0 number for this array index binary value continuously from lowest order, and the array element in second array contains 0 number for this array index binary value continuously from most significant digit; With the array element addition corresponding to first array or second array of each byte that inquires, obtaining dot matrix left side or right side be the pixel width of sky entirely.
Preferably, in the wide step that is converted to the byte SerComm with the pixel of dot matrix, the pixel width value of dot matrix is added fixed value 7, then move right 3 scale-of-two " displacement " of the value that obtains is operated, thereby obtain the byte SerComm of dot matrix.
Preferably, the dot matrix width is the columns of the pixel of dot matrix.
Preferably, the dot matrix width of character is developed width and the required character pitch width sum of character.
According to another aspect of the present invention, provide a kind for the treatment of apparatus of character pitch, having comprised: first device is used for obtaining character at the dot matrix width of font file; Second device is used for the developed width that calculating character takies at dot matrix; The 3rd device is used for the display width of determining character according to developed width and the required character pitch width of character; The 4th device shows character for the display width of pressing character.
The present invention has following beneficial effect:
1. in the present invention, by obtaining character shared developed width in its corresponding dot matrix, according to shared developed width the demonstration spacing of character on graphical interfaces is set then, thereby can solve because character shared developed width difference in the dot matrix of correspondence, and cause the spacing width of adjacent character not wait, thereby influence the problem of the display effect of character.According to the spacing disposal route of character provided by the present invention, no matter what kind of institutional framework the type matrix of character in font file is, can both process by demand the demonstration spacing of character easily, and then reach good display.
2. in the present invention, obtain dot matrix left side or the right side is empty pixel width entirely by the method that adopts a kind of array to search, thereby can reduce cycle index, improve counting yield, the runnability when improving machine processing.
3. the present invention is in the step of the byte SerComm that calculates dot matrix, adopted the pixel width value with dot matrix to add fixed value, and then carry out the computing mode that " displacement " operated, can obviously improve the counting yield of byte SerComm, the runnability when improving machine processing.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used for explaining the present invention, do not constitute improper restriction of the present invention.In the accompanying drawings:
Fig. 1 shows the process flow figure of character pitch according to an embodiment of the invention;
Fig. 2 shows the dot matrix synoptic diagram of character " i ";
Fig. 3 shows the character pitch process flowchart to character shown in Fig. 2 " i ";
Fig. 4 shows the process flow diagram flow chart that obtains the developed width of character according to one embodiment of the invention;
Fig. 5 shows the treating apparatus figure of character pitch of the present invention.
Embodiment
Below with reference to the accompanying drawings and in conjunction with the embodiments, describe the present invention in detail.
Fig. 1 shows the disposal route of character pitch according to an embodiment of the invention, may further comprise the steps:
S102 obtains the dot matrix width of character in font file; Character on the graphical interfaces normally shows according to the dot matrix of this character in the font file, the array that dot matrix is made up of m * n pixel.The quality how much the depending on of dot matrix shows character and the size of character display window, for example, the dot matrix of certain character pattern data is 16 * 16, namely its dot matrix width is 16.
The developed width that S104, calculating character take in dot matrix; The profile of in dot matrix, representing this character with actual situation or the explicit identification of each pixel.The developed width that character takies in dot matrix in the present embodiment refers to the columns for the real image vegetarian refreshments of the profile of this character of expression.
S106, the dot matrix width of determining character according to developed width and the required character pitch width of character; Required character pitch width is this set character of user and the width between the adjacent character.
S108, the dot matrix width of pressing character shows character.The user just can export this character by the dot matrix width of determining after having determined the initial pixel column and end pixel row of character.
In the above-described embodiment, at first, obtain character shared developed width in its corresponding dot matrix, according to shared developed width the demonstration spacing of character on graphical interfaces is set then, thereby can solve because character shared developed width difference in the dot matrix of correspondence, and cause the spacing width of adjacent character not wait, the character pitch disposal route that provides according to above-described embodiment, no matter what kind of institutional framework the type matrix of character in font file is, can both process by demand the demonstration spacing of character easily, and then reach good display.
Fig. 2 shows the dot matrix synoptic diagram of character " i ", and as shown in Figure 2, the dot matrix of character " i " is one 16 * 16 dot matrix, wherein, " 0 " represents this place's display background, and " 1 " represents that this place shows character, and all " 1 " parts demonstrate the character outline of " i ".
Fig. 3 shows the process flowchart to character pitch shown in Fig. 2, may further comprise the steps:
Step S302 obtains the dot matrix width w_p of character " i ", and the pixel columns of the dot matrix of character " i " is 16, then draws: w_p=16.
Step S304, the row that calculate the dot matrix left pixel point of character " i " are empty width w_l entirely.Width w_l is the full columns for " 0 " in dot matrix left side, w_l=5.
Step S306, the row that calculate the dot matrix right pixel point of character " i " are empty width w_r entirely.It is the columns of " 0 " entirely that width w_r is the dot matrix right side, w_r=5.
Step S308, the developed width w_h that calculating character " i " takies in dot matrix, the developed width that character " i " takies in dot matrix is the columns of " 1 ", the row that deduct dot matrix left pixel point with dot matrix width w_p respectively are that the width w_l of sky and the row of dot matrix right pixel point are empty width w_r entirely entirely, can obtain the developed width w_h=6 that character " i " takies in dot matrix.
Step S310 adjusts character pitch according to the developed width of character " i ".If the user wishes that the spacing width of the character that character on graphical interfaces " i " is adjacent with the left side is 2 pixels, then can the left side of the dot matrix of character " i " rise the 4th row as initial row, the 11st row are as end column, the dot matrix width of described character is developed width and the required character pitch width sum of described character, thereby the dot matrix width of determining character " i " is 8.
Step S312, according to dot matrix width output character " i " on graphical interfaces of determining among the step S206, in the present embodiment, if the spacing of character " i " is not handled, and the dot matrix of directly pressing in the font file is exported, and then character " i " is 5 with the spacing of left side adjacent character.The spacing width that carries out character " i " and left side adjacent character after spacing is adjusted as required is 2, has realized the purpose of on demand spacing of character " i " being handled.
Fig. 4 shows the process flow diagram flow chart that obtains the developed width of character according to one embodiment of the invention.In the present embodiment, the wide w_p of pixel with the corresponding dot matrix of character pattern data is converted to byte SerComm w_b earlier, for example certain character pattern data corresponds to 24 * 24 dot matrix, then its pixel is wide is 24, being converted to the byte SerComm just is 3, wherein in the calculating of byte conversion, can adopt to add certain fixed value earlier and then carry out " displacement " operation and realize.Be that pixel width value with dot matrix adds fixed value 7 in the present embodiment, then move right 3 scale-of-two " displacement " of the value that obtains operated, thereby obtain the byte SerComm of dot matrix.Calculate all corresponding character pattern data lowest orders of dot matrix right side then and contain 0 number continuously, and obtain minimum value in these numbers, used two speed that technology is accelerated to calculate here: 1) earlier with the character pattern data on dot matrix right side all mutually or, obtain a value; 2) should value import specific array as subscript, the corresponding array element of this subscript is just for this value lowest order contains 0 number continuously, and this process abbreviates " tabling look-up " as.At most the row that just can obtain dot matrix right pixel point by w_b time " tabling look-up " are 0 width w_r entirely.The use the same method row that can calculate dot matrix left pixel point of profit are 0 width w_l entirely, when the row that calculate left pixel point are 0 width entirely, array element in the array of inquiring about contains 0 number continuously for this value most significant digit, remove w_r and w_l with the pixel reductions of character pattern data again, namely obtained the width of type matrix reality.Add the character pitch that the user arranges, finally just can obtain the display width of character.
Fig. 5 shows according to the treating apparatus corresponding with the disposal route of aforementioned character pitch of the present invention, comprising: first device 10 is used for obtaining character at the dot matrix width of font file; Second device 20 is used for the developed width that calculating character takies at dot matrix; The 3rd device 30 is used for the display width of determining character according to developed width and the required character pitch width of character; The 4th device 40 shows character for the display width of pressing character.
From above description, as can be seen, the above embodiments of the present invention have realized following technique effect: in the above-described embodiments, by obtaining character shared developed width in its corresponding dot matrix, according to shared developed width the demonstration spacing of character on graphical interfaces is set then, thereby can solve because character shared developed width difference in the dot matrix of correspondence, and cause the spacing width of adjacent character not wait, thereby influence the problem of the display effect of character.According to the spacing disposal route of character provided by the present invention, no matter what kind of institutional framework the type matrix of character in font file is, can both process by demand the demonstration spacing of character easily, and then reach good display.
The above only is the preferred embodiments of the present invention, be not limited to the present invention, the present invention not only is used for the graphical interfaces of Medical Devices, can also be used for the graphical interfaces of other embedded system, for a person skilled in the art, the present invention can also have various changes and variation.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (5)

1. the disposal route of character pitch in the graphical interfaces is characterized in that, may further comprise the steps:
S102 obtains the dot matrix width of character in font file;
S104 calculates the developed width that described character takies in described dot matrix;
S106, the display width of determining described character according to developed width and the required character pitch width of described character;
S108 shows described character by the described display width of described character;
Wherein, described step S104 may further comprise the steps:
With the wide byte SerComm that is converted to of the pixel of described dot matrix;
The character pattern data of each byte of described dot matrix being carried out inclusive-OR operation with the byte unit of classifying as, obtain a value, is that cycle index repeats this operation with described byte SerComm, stops cycling if income value is not 0, obtains one group of described value;
Inquire about first array or second array as array index respectively with each described value, array element in described first array contains 0 number for the binary value of this array index continuously from lowest order, and the array element in described second array contains 0 number for the binary value of this array index continuously from most significant digit;
With the array element addition corresponding to first array or second array of each byte that inquires, obtain described dot matrix left side or right side and be empty pixel width entirely;
The row that deduct described dot matrix left pixel point with the dot matrix width of described dot matrix respectively obtain the developed width that described character takies for the width of sky entirely for the row of empty width and right pixel point entirely in described dot matrix.
2. the disposal route of character pitch according to claim 1, it is characterized in that, in the wide step that is converted to the byte SerComm with the pixel of described dot matrix, the pixel width value of described dot matrix is added fixed value 7, then move right 3 scale-of-two " displacement " of the value that obtains is operated, thereby obtained the byte SerComm of described dot matrix.
3. the disposal route of character pitch according to claim 1 is characterized in that, described dot matrix width is the columns of the pixel of described dot matrix.
4. the disposal route of character pitch according to claim 1 is characterized in that, the display width of described character is developed width and the required character pitch width sum of described character.
5. the treating apparatus of character pitch in the graphical interfaces is characterized in that, comprising:
Be used for obtaining character at the device of the dot matrix width of font file;
Be used for to calculate the device of the developed width that described character takies at described dot matrix;
For the device of determining the display width of described character according to developed width and the required character pitch width of described character;
Be used for showing by the described display width of described character the device of described character;
Wherein, describedly also comprise with lower device for the device that calculates the developed width that described character takies at described dot matrix:
Be used for the wide device that is converted to the byte SerComm of the pixel of described dot matrix;
Being used for the character pattern data of each byte of described dot matrix is carried out inclusive-OR operation with the byte unit of classifying as, obtaining a value, is that cycle index repeats this operation with described byte SerComm, stops cycling if income value is not 0, obtains the device of one group of described value;
Be used for inquiring about first array or second array as array index respectively with each described value, array element in described first array contains 0 number for the binary value of this array index continuously from lowest order, and the array element in described second array contains the device of 0 number for the binary value of this array index continuously from most significant digit;
The array element addition corresponding to first array or second array of each byte that is used for inquiring obtains described dot matrix left side or right side and is the device of empty pixel width entirely;
Being used for row that dot matrix width with described dot matrix deducts described dot matrix left pixel point respectively is the device that the width of sky obtains the developed width that described character takies at described dot matrix for the row of empty width and right pixel point entirely entirely.
CN 200910217581 2009-12-31 2009-12-31 Method and device for processing character pitch Expired - Fee Related CN102117266B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910217581 CN102117266B (en) 2009-12-31 2009-12-31 Method and device for processing character pitch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910217581 CN102117266B (en) 2009-12-31 2009-12-31 Method and device for processing character pitch

Publications (2)

Publication Number Publication Date
CN102117266A CN102117266A (en) 2011-07-06
CN102117266B true CN102117266B (en) 2013-07-10

Family

ID=44216041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910217581 Expired - Fee Related CN102117266B (en) 2009-12-31 2009-12-31 Method and device for processing character pitch

Country Status (1)

Country Link
CN (1) CN102117266B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104717548B (en) * 2015-03-05 2017-11-24 福建新大陆通信科技股份有限公司 A kind of set top box dot matrix captions font processing method and processing system
CN107393494A (en) * 2017-08-17 2017-11-24 福建星网锐捷通讯股份有限公司 A kind of font dot matrix display methods and storage device based on LCDs
CN108021424A (en) * 2017-12-15 2018-05-11 苏州咖博士咖啡系统科技有限公司 LCD screen shows that various countries' language produces the solution method of word spacing
CN111986631B (en) * 2019-05-23 2022-02-18 西安诺瓦星云科技股份有限公司 Character display method, device, system and storage medium
CN112785516A (en) * 2021-01-05 2021-05-11 大陆汽车车身电子系统(芜湖)有限公司 Numerical value display method and vehicle speed display method based on digital pictures
CN114442978A (en) * 2021-12-06 2022-05-06 深圳市乐升半导体有限公司 Character space adjusting method and device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6967689B1 (en) * 2001-05-08 2005-11-22 Pixelworks, Inc. System and method for providing a variable character size in an on-screen display application
CN101008939A (en) * 2007-01-25 2007-08-01 深圳创维-Rgb电子有限公司 Implementation method of dot matrix word library of embedded system
CN101114443A (en) * 2006-07-28 2008-01-30 中国科学院声学研究所 Dot-character retracting method in two-dimension pattern engines and Chinese processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6967689B1 (en) * 2001-05-08 2005-11-22 Pixelworks, Inc. System and method for providing a variable character size in an on-screen display application
CN101114443A (en) * 2006-07-28 2008-01-30 中国科学院声学研究所 Dot-character retracting method in two-dimension pattern engines and Chinese processing method
CN101008939A (en) * 2007-01-25 2007-08-01 深圳创维-Rgb电子有限公司 Implementation method of dot matrix word library of embedded system

Also Published As

Publication number Publication date
CN102117266A (en) 2011-07-06

Similar Documents

Publication Publication Date Title
CN102117266B (en) Method and device for processing character pitch
CN104123608B (en) A kind of method and apparatus for establishing accounting records
CN104516867A (en) Table reordering method and table reordering system
CN104268615A (en) Encoding method and decoding method for color two-dimensional code
CN103809838A (en) Numerical value input process method, system thereof and simulation voucher data input process method
CN114708461A (en) Multi-modal learning model-based classification method, device, equipment and storage medium
CN115222845A (en) Method and device for generating style font picture, electronic equipment and medium
CN104636309A (en) Matrix calculator based on machine vision and matrix identification method
CN111428446B (en) Questionnaire identification method and questionnaire identification system
CN112528984A (en) Image information extraction method, device, electronic equipment and storage medium
CN102467490B (en) Font data processing method and device
JPS5945589A (en) Graph making device
CN104442054A (en) Two-dimension code printing method and device based on mainframe platform
CN106874979A (en) A kind of bar code treatment, display, read method and device
CN113360155A (en) Front-end interface background color matching method, device, equipment and storage medium
CN1363995A (en) Coding character correctness check by difference in shape
WO2012068009A1 (en) Method for generating images from text
CN108762693A (en) A kind of print from the definition design system and method
JPS63233465A (en) Input display system for numerical format code
CN109299450A (en) Dynamic statement method for exhibiting data in a kind of business management software
CN107798310A (en) A kind of intelligent interaction is self-service to fill out single print system
CN105373822A (en) Rectangular anti-fake label, reading method and system
JP3663865B2 (en) Form processing apparatus and storage medium
CN102004723A (en) Electronic form system with dynamic display and method thereof
CN103455311A (en) Drawing code generation system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130710

Termination date: 20181231

CF01 Termination of patent right due to non-payment of annual fee