CN101763845A - Method for calculating the display width of characters in a dot matrix character library - Google Patents
Method for calculating the display width of characters in a dot matrix character library Download PDFInfo
- Publication number
- CN101763845A CN101763845A CN200810207948A CN200810207948A CN101763845A CN 101763845 A CN101763845 A CN 101763845A CN 200810207948 A CN200810207948 A CN 200810207948A CN 200810207948 A CN200810207948 A CN 200810207948A CN 101763845 A CN101763845 A CN 101763845A
- Authority
- CN
- China
- Prior art keywords
- character
- width
- calculating
- display
- dot matrix
- 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.)
- Pending
Links
Images
Abstract
The invention discloses a method for calculating the display width of characters in a dot matrix character library. The method is characterized by comprising the following steps: a. starting (introducing character strings); b. recording and displaying a left-side position abscissa x1; c. displaying the characters; d. taking a first character and calculating the width w of the character; e. the display position abscissa of the character X1 is equal to x1 plus w; and f. judging whether the inputting of the character string is ended. The invention discloses a method for calculating the display width of characters in the dot matrix character library, which solves the problems of interface display faced when equal-width character libraries are used for displaying unequal-width characters. The most suitable display position of each dot matrix character is calculated by judging the actual display width thereof so as to achieve the purpose of compact and beautiful display of characters.
Description
Technical field:
The present invention relates to the technical field of mobile communication, refer to when carrying out display string a kind of display width computing method of being out of shape font especially with dot matrix word library.
Background technology:
Dot matrix word library applies to numerous demonstrations to font in the higher platform of rate request.Divide by storage mode, horizontal delivery can be arranged, the many kinds of vertical delivery or the like, but generally speaking, be to represent font display part and blank parts respectively with 1 and 0.
For convenience of understanding, the dot matrix word library that the present invention write uses 1 expression display element, the blank pixel of 0 expression, and storage format is with the behavior element, and per 8 picture elements gather into a byte, and the mode with back benefit 0 of 8 picture elements of less than is gathered into a byte.Like this, the width of each font just must be the same, and for some West Europe font, this dot matrix word library can't reach and show requirement attractive in appearance.
Summary of the invention:
The object of the present invention is to provide a kind of method of calculating dot matrix word library font display width, thereby each raster font calculates only display position by judging its actual display width, show compact to reach font, beautiful purpose has overcome the shortcoming and defect that exists in the prior art.
To achieve these goals, technical scheme of the present invention is: a kind of method of calculating dot matrix word library font display width is characterized in that: described step is:
A, beginning (importing character string into);
B, record show leftward position x1;
C, character display;
D, get first character, calculating character width w;
E, CSD horizontal ordinate X1=x1+w;
F, judge character string whether finish the input.
The invention discloses a kind of method of calculating dot matrix word library font display width, solved the interface display problem that is faced when showing monospaced font not with wide character library.Thereby each raster font calculates only display position by judging its actual display width, shows compactness, beautiful purpose to reach font.
Description of drawings:
Fig. 1 is the single character duration calculation flow chart of example of the present invention.
Fig. 2 is the character string display process flow diagram of example of the present invention.
Embodiment:
With reference to the accompanying drawings, the present invention further is described
The present invention is a kind of method of calculating dot matrix word library font display width, and it is different from prior art and is: described step is:
A, beginning (importing character string into);
B, record show leftward position horizontal ordinate x1;
C, character display;
D, get first character, calculating character width w;
E, CSD horizontal ordinate X1=x1+w;
F, judge character string whether finish the input.
2, a kind of method of calculating dot matrix word library font display width according to claim 1, it is characterized in that: the flow process substep of steps d is:
1. begin (importing word-base data into);
2. write down original width W=0;
3. get delegation's dot array data, last is 1 some picture element number m to the right side to calculate the left side;
4. whether differentiate m greater than W, if m>W, W=m then, then dot character finishes then, if m≤W, then directly dot character finishes.
This method need interdependently realize in the cell phone software of integral body.
One, single character duration calculating is an independently module, provides several public interface functions, for other module invokes.
Two, when use is of the present invention, carry out the demonstration of character string according to Fig. 2 flow process.
Three, step: please refer to Fig. 2, when needing display string, preserve the horizontal ordinate position in character string display zone earlier, when having shown a character at every turn, according to the width of the flow process calculating character of Fig. 1, and then the demonstration horizontal ordinate position of calculating character late according to the flow process of Fig. 2.
Being preferred embodiment of the present invention only in sum, is not to be used for limiting practical range of the present invention.
Claims (2)
1. method of calculating dot matrix word library font display width, it is characterized in that: described step is:
A, beginning (importing character string into);
B, record show leftward position horizontal ordinate x1;
C, character display;
D, get first character, calculating character width w;
E, CSD horizontal ordinate X1=x1+w;
F, judge character string whether finish the input.
2. a kind of method of calculating dot matrix word library font display width according to claim 1 is characterized in that: the flow process substep of steps d is:
1. begin (importing word-base data into);
2. write down original width W=0;
3. get delegation's dot array data, last is 1 some picture element number m to the right side to calculate the left side;
4. whether differentiate m greater than W, if m>W, W=m then, then dot character finishes then, if m≤W, then directly dot character finishes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810207948A CN101763845A (en) | 2008-12-26 | 2008-12-26 | Method for calculating the display width of characters in a dot matrix character library |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810207948A CN101763845A (en) | 2008-12-26 | 2008-12-26 | Method for calculating the display width of characters in a dot matrix character library |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101763845A true CN101763845A (en) | 2010-06-30 |
Family
ID=42494968
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200810207948A Pending CN101763845A (en) | 2008-12-26 | 2008-12-26 | Method for calculating the display width of characters in a dot matrix character library |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101763845A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106201009A (en) * | 2016-06-24 | 2016-12-07 | 维沃移动通信有限公司 | A kind of characters input method and electronic equipment |
CN111986631A (en) * | 2019-05-23 | 2020-11-24 | 西安诺瓦星云科技股份有限公司 | 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 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS55115136A (en) * | 1979-02-23 | 1980-09-04 | Sanyo Electric Co Ltd | Character pattern forming system |
US4283724A (en) * | 1979-02-28 | 1981-08-11 | Computer Operations | Variable size dot matrix character generator in which a height signal and an aspect ratio signal actuate the same |
JPH0452690A (en) * | 1990-06-20 | 1992-02-20 | Sony Corp | Display device |
JP3314443B2 (en) * | 1993-03-12 | 2002-08-12 | 富士ゼロックス株式会社 | Character output device |
CN1581283A (en) * | 2003-08-04 | 2005-02-16 | 三星电子株式会社 | Co-screen displaying device supporting scale chracter shape and method thereof |
CN101114443A (en) * | 2006-07-28 | 2008-01-30 | 中国科学院声学研究所 | Dot-character retracting method in two-dimension pattern engines and Chinese processing method |
-
2008
- 2008-12-26 CN CN200810207948A patent/CN101763845A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS55115136A (en) * | 1979-02-23 | 1980-09-04 | Sanyo Electric Co Ltd | Character pattern forming system |
US4283724A (en) * | 1979-02-28 | 1981-08-11 | Computer Operations | Variable size dot matrix character generator in which a height signal and an aspect ratio signal actuate the same |
JPH0452690A (en) * | 1990-06-20 | 1992-02-20 | Sony Corp | Display device |
JP3314443B2 (en) * | 1993-03-12 | 2002-08-12 | 富士ゼロックス株式会社 | Character output device |
CN1581283A (en) * | 2003-08-04 | 2005-02-16 | 三星电子株式会社 | Co-screen displaying device supporting scale chracter shape and method thereof |
CN101114443A (en) * | 2006-07-28 | 2008-01-30 | 中国科学院声学研究所 | Dot-character retracting method in two-dimension pattern engines and Chinese processing method |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106201009A (en) * | 2016-06-24 | 2016-12-07 | 维沃移动通信有限公司 | A kind of characters input method and electronic equipment |
CN106201009B (en) * | 2016-06-24 | 2019-05-17 | 维沃移动通信有限公司 | A kind of characters input method and electronic equipment |
CN111986631A (en) * | 2019-05-23 | 2020-11-24 | 西安诺瓦星云科技股份有限公司 | Character display method, device, system and storage medium |
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 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106339061B (en) | A kind of mobile terminal and its method for running application program | |
TW200623047A (en) | Storage medium storing interactive graphics stream, and reproducing apparatus and method | |
CN101202033A (en) | System, method and computer program product for adjusting a refresh rate of a display | |
CN101547252A (en) | Communication device and information inputting method | |
CN101763256A (en) | Expansion application method, device and business system of business objects | |
CN105653283A (en) | Embedded system terminal and boot LOGO picture displaying and changing method thereof | |
CN113220162A (en) | Real-time interaction method, terminal and storage medium for electronic screen | |
CN102262847A (en) | Embedded light-emitting diode (LED) display control system and method for controlling same | |
CN111752504B (en) | Multi-screen display method and system for electronic equipment, electronic equipment and computer readable medium | |
US9245485B1 (en) | Dithering techniques for electronic paper displays | |
CN103794182B (en) | Display control unit and data handling system | |
CN101326513B (en) | Method for utilizing alternative graphics pipe | |
US20070013700A1 (en) | Mobile communication terminal having function of animating input characters | |
CN108961361B (en) | Method and system for generating special effect text image and computer equipment | |
CN101763845A (en) | Method for calculating the display width of characters in a dot matrix character library | |
CN106126140A (en) | Method and device for rendering characters and electronic equipment | |
CN104156191A (en) | System and method for extending mobile electronic device to PC display | |
CN103186507B (en) | Dot matrix word library processing method | |
CN106095744B (en) | Irregular control icons processing unit and method | |
CN108038219A (en) | Picture method to set up, device, computer installation and computer-readable recording medium | |
CN103365559A (en) | Method for drawing sliding trace and mobile terminal | |
CN110489724A (en) | Synthetic method, mobile terminal and the storage medium of hand-written script | |
CN107678718A (en) | Compatibility processing method, mobile terminal and the storage medium of different resolution display screen | |
US9489916B2 (en) | Processing method of an external-image device | |
CN103309878A (en) | Method and device used for layout in webpage displaying |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20100630 |