CN103559271A - Method for generating bitmap font library with gray level - Google Patents

Method for generating bitmap font library with gray level Download PDF

Info

Publication number
CN103559271A
CN103559271A CN201310541513.9A CN201310541513A CN103559271A CN 103559271 A CN103559271 A CN 103559271A CN 201310541513 A CN201310541513 A CN 201310541513A CN 103559271 A CN103559271 A CN 103559271A
Authority
CN
China
Prior art keywords
font
gray shade
shade scale
module
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
Application number
CN201310541513.9A
Other languages
Chinese (zh)
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.)
FEIGE KANGCAI (BEIJING) SOFTWARE TECHNOLOGY Co Ltd
Original Assignee
FEIGE KANGCAI (BEIJING) SOFTWARE TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by FEIGE KANGCAI (BEIJING) SOFTWARE TECHNOLOGY Co Ltd filed Critical FEIGE KANGCAI (BEIJING) SOFTWARE TECHNOLOGY Co Ltd
Priority to CN201310541513.9A priority Critical patent/CN103559271A/en
Publication of CN103559271A publication Critical patent/CN103559271A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/22Procedural

Landscapes

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

Abstract

The invention provides a system for generating a bitmap font library with a gray level. The system comprises a bitmap font generating module, a font size adjusting module, a gray level adding module, a display module and a GDI (Graphic Device Interface), wherein the bitmap font generating module is used for creating bitmap fonts of specified sizes; the font size adjusting module is used for adjusting the bitmap fonts; the gray level adding module is used for obtaining a font bitmap of gray level 65 through a function CGO_GRAY8_BITMAP so as to obtain bitmap font information of the gray level. According to the system, the bitmap font library with the gray level is generated, so that remarkable saw teeth are avoided during zooming; moreover, the sizes of fonts are not limited.

Description

A kind of dot-matrix library generating method with gray shade scale
Technical field
The present invention relates to dot matrix word library generation technique field, relate in particular to a kind of dot-matrix library generating method with gray shade scale.
Background technology
Raster font advantage is that display speed is fast, unlike vector fonts, needs to calculate; Its maximum shortcoming is to amplify, once will find the sawtooth at word edge after amplifying.
Raster font is also bit-mapped font, and wherein each font represents with one group of two-dimensional pixel information.This word display mode for example, is generally adopted for computer system (dos operating system while not having graphic interface) not long ago.Due to the cause of bitmap, raster font is difficult to carry out convergent-divergent, and specific raster font can only clearly be presented under corresponding font size, otherwise word only amplified and distortion font by force, produces into the jagged edges of mosaic.But be also still used in now screen for the less Chinese character style of the size of font size 8-14px (the acquiescence font size that operating system adopts mostly now), show above, higher display effect can be provided; But this kind of raster font is main only as the part of " assisting " now, and when the font size of user's setting does not have bit image, font just can show in vector-valued image mode; And when printing, be printed on regardless of different kinds of font and also can use vector font to print.
Dot matrix word library is commonly used to as showing character library use, and the shortcoming of this class dot matrix word library Chinese character maximum is to amplify, once will find the sawtooth at word edge after amplifying.
What vector font library was preserved is the descriptor to each Chinese character, such as initial, the termination coordinate of a stroke, radius, radian etc.When showing, printing this class character library, to just can calculate result through a series of mathematical operation, but on the characters theory that this class character library is preserved, can ad infinitum be amplified, it is round and smooth that stroke profile still can keep, and the character library of using during printing is this type of character library.The character library that Windows is used is also above two classes, and under FONTS catalogue, if font expansion FON by name, expression this document is dot matrix word library, and expansion TTF by name represents vector font library.
The major defect of prior art scheme has: 1, generate dot matrix word library process in, only generated the dot matrix word library that single pixel represents, there is no the transition of gray shade scale, when Zoom display, have sawtooth clearly; 2, user can only use the character library of maximum No. 64 fonts of Software Create, restricted to font size size.
Summary of the invention
The shortcoming that the present invention has obvious sawtooth and can only generate the character library of No. 64 fonts for solving the above-mentioned existing dot matrix word library of mentioning when convergent-divergent, provides a kind of dot matrix word library generation system and method with gray shade scale.
Concrete, the invention provides a kind of dot matrix word library generation system with gray shade scale, it comprises raster font generation module, font size adjusting module, adds gray shade scale module and display module; The described dot matrix word library generation system with gray shade scale also comprises GDI (Graphics Device Interface);
Described raster font generation module is by the corresponding parameter of CreateFont function setup of described GDI interface, and big or small raster font is specified in establishment;
Described font size adjusting module obtains the information of raster font by the GetGlyphOutline of described GDI interface, and by GetTextMetrics function, obtaining the dimension information of corresponding font, described font size adjusting module regulates described raster font by the dimension information obtaining;
Described interpolation gray shade scale module is obtained the information of described raster font by GDI interface GetGlyphOutline function, and by function CGO_GRAY8_BITMAP, obtains the glyph bitmap of 65 grades of grey, thereby obtains the raster font information containing gray shade scale;
Described display module is provided with self-defined form, can show described raster font, thereby generates the dot matrix word library with gray shade scale.
Preferably, the GB2312 code of described self-defined form simplified form of Chinese Character and the correspondence table of UNICODE code.
Preferably, described display module comprises LED screen.
Preferably, a kind of method that generates dot matrix word library according to described dot matrix word library generation system: it comprises the following steps:
The first step: raster font generation module is by the corresponding parameter of CreateFont function setup of described GDI interface, and big or small raster font is specified in establishment;
Second step: font size adjusting module obtains the information of raster font by the GetGlyphOutline of described GDI interface, and by GetTextMetrics function, obtaining the dimension information of corresponding font, described font size adjusting module regulates described raster font by the dimension information obtaining;
The 3rd step: add gray shade scale module and obtain the information of described raster font by GDI interface GetGlyphOutline function, and by function CGO_GRAY8_BITMAP, obtain the glyph bitmap of 65 grades of grey, thereby obtain the raster font information containing gray shade scale;
The 4th step: display module, according to the self-defined form arranging, shows described raster font, thus the dot matrix word library with gray shade scale generated.
Beneficial effect of the present invention is: by generating the dot matrix word library with gray shade scale, there is no sawtooth clearly when Zoom display; And to the not restriction of the size of font size.
Accompanying drawing explanation
Fig. 1 is the structural representation of system of the present invention.
Embodiment
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
As shown in Figure 1, a kind of dot matrix word library generation system with gray shade scale, it comprises raster font generation module 1, font size adjusting module 2, adds gray shade scale module 3 and display module 4; Dot matrix word library generation system with gray shade scale also comprises GDI (Graphics Device Interface);
Raster font generation module 1 is by the corresponding parameter of CreateFont function setup of described GDI interface, and big or small raster font is specified in establishment;
Font size adjusting module 2 obtains the information of raster font by the GetGlyphOutline of described GDI interface, and by GetTextMetrics function, obtaining the dimension information of corresponding font, described font size adjusting module regulates described raster font by the dimension information obtaining;
Add gray shade scale module 3 and obtain the information of described raster font by GDI interface GetGlyphOutline function, and by function CGO_GRAY8_BITMAP, obtain the glyph bitmap of 65 grades of grey, thereby obtain the raster font information containing gray shade scale;
Display module 4 is provided with self-defined form, can show described raster font, thereby generates the dot matrix word library with gray shade scale.
Self-defined form comprises the GB2312 code of simplified form of Chinese Character and the correspondence table of UNICODE code.
Preferably, display module 4 comprises LED screen.
Embodiment:
According to described dot matrix word library generation system, generate the method for dot matrix word library: it comprises the following steps:
The first step: raster font generation module 1 is crossed the corresponding parameter of CreateFont function setup of described GDI interface, and create the big or small raster font of appointment;
Second step: the GetGlyphOutline that font size adjusting module 2 is crossed described GDI interface obtains the information of raster font, and by GetTextMetrics function, obtaining the dimension information of corresponding font, described font size adjusting module regulates described raster font by the dimension information obtaining;
The 3rd step: interpolation gray shade scale module 3 is crossed GDI interface GetGlyphOutline function and obtained the information of described raster font, and obtains the glyph bitmap of 65 grades of grey by function CGO_GRAY8_BITMAP, thereby obtains the raster font information containing gray shade scale;
The 4th step: display module 4, according to the self-defined form arranging, shows described raster font, thus the dot matrix word library with gray shade scale generated.
Beneficial effect of the present invention is: by generating the dot matrix word library with gray shade scale, there is no sawtooth clearly when Zoom display; And to the not restriction of the size of font size.
Those skilled in the art will readily understand; the foregoing is only preferred embodiment of the present invention; not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.

Claims (4)

1. with a dot matrix word library generation system for gray shade scale, it is characterized in that: it comprises raster font generation module, font size adjusting module, adds gray shade scale module and display module; The described dot matrix word library generation system with gray shade scale also comprises GDI interface;
Described raster font generation module is by the corresponding parameter of CreateFont function setup of described GDI interface, and big or small raster font is specified in establishment;
Described font size adjusting module obtains the information of raster font by the GetGlyphOutline of described GDI interface, and by GetTextMetrics function, obtaining the dimension information of corresponding font, described font size adjusting module regulates described raster font by the dimension information obtaining;
Described interpolation gray shade scale module is obtained the information of described raster font by the GetGlyphOutline function of GDI interface, and by function CGO_GRAY8_BITMAP, obtains the glyph bitmap of 65 grades of grey, thereby obtains the raster font information containing gray shade scale;
Described display module is provided with self-defined form, can show described raster font, thereby generates the dot matrix word library with gray shade scale.
2. the dot matrix word library generation system with gray shade scale according to claim 1, is characterized in that: the GB2312 code of described self-defined form simplified form of Chinese Character and the correspondence table of UNICODE code.
3. the dot matrix word library generation system with gray shade scale according to claim 2, is characterized in that: described display module comprises LED screen.
4. according to the dot matrix word library generation system with gray shade scale described in the aforementioned arbitrary claim of claim, generate the method for dot matrix word library: it is characterized in that: it comprises the following steps:
The first step: raster font generation module is by the corresponding parameter of CreateFont function setup of described GDI interface, and big or small raster font is specified in establishment;
Second step: font size adjusting module obtains the information of raster font by the GetGlyphOutline of described GDI interface, and by GetTextMetrics function, obtaining the dimension information of corresponding font, described font size adjusting module regulates described raster font by the dimension information obtaining;
The 3rd step: add gray shade scale module and obtain the information of described raster font by GDI interface GetGlyphOutline function, and by function CGO_GRAY8_BITMAP, obtain the glyph bitmap of 65 grades of grey, thereby obtain the raster font information containing gray shade scale;
The 4th step: display module, according to the self-defined form arranging, shows described raster font, thus the dot matrix word library with gray shade scale generated.
CN201310541513.9A 2013-11-06 2013-11-06 Method for generating bitmap font library with gray level Pending CN103559271A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310541513.9A CN103559271A (en) 2013-11-06 2013-11-06 Method for generating bitmap font library with gray level

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310541513.9A CN103559271A (en) 2013-11-06 2013-11-06 Method for generating bitmap font library with gray level

Publications (1)

Publication Number Publication Date
CN103559271A true CN103559271A (en) 2014-02-05

Family

ID=50013517

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310541513.9A Pending CN103559271A (en) 2013-11-06 2013-11-06 Method for generating bitmap font library with gray level

Country Status (1)

Country Link
CN (1) CN103559271A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050155A (en) * 2014-07-01 2014-09-17 西安诺瓦电子科技有限公司 Text editing device and method
CN107393494A (en) * 2017-08-17 2017-11-24 福建星网锐捷通讯股份有限公司 A kind of font dot matrix display methods and storage device based on LCDs
CN112256228A (en) * 2020-11-17 2021-01-22 深圳高通半导体有限公司 Optimization method for dot matrix character display

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6339426B1 (en) * 1999-04-29 2002-01-15 Microsoft Corporation Methods, apparatus and data structures for overscaling or oversampling character feature information in a system for rendering text on horizontally striped displays
CN101008939A (en) * 2007-01-25 2007-08-01 深圳创维-Rgb电子有限公司 Implementation method of dot matrix word library of embedded system
CN102760299A (en) * 2012-06-25 2012-10-31 深圳市邦旭科技有限公司 Method for rapidly amplifying black-white dot matrix font into integral multiple gray level dot matrix font

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6339426B1 (en) * 1999-04-29 2002-01-15 Microsoft Corporation Methods, apparatus and data structures for overscaling or oversampling character feature information in a system for rendering text on horizontally striped displays
CN101008939A (en) * 2007-01-25 2007-08-01 深圳创维-Rgb电子有限公司 Implementation method of dot matrix word library of embedded system
CN102760299A (en) * 2012-06-25 2012-10-31 深圳市邦旭科技有限公司 Method for rapidly amplifying black-white dot matrix font into integral multiple gray level dot matrix font

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
苪晓飞等: "LED屏幕点阵字符显示***应用研究", 《仪器仪表学报》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050155A (en) * 2014-07-01 2014-09-17 西安诺瓦电子科技有限公司 Text editing device and method
CN107393494A (en) * 2017-08-17 2017-11-24 福建星网锐捷通讯股份有限公司 A kind of font dot matrix display methods and storage device based on LCDs
CN112256228A (en) * 2020-11-17 2021-01-22 深圳高通半导体有限公司 Optimization method for dot matrix character display

Similar Documents

Publication Publication Date Title
US8081346B1 (en) System to create image transparency in a file generated utilising a print stream
AU2003200547B2 (en) Method for selecting a font
US8717596B2 (en) Systems and methods for providing variable data printing (VDP) using dynamic font downgrading
US8922582B2 (en) Text rendering and display using composite bitmap images
RU2439676C2 (en) Transfer of characters in subpixel resolution
JP2015130158A (en) Cloud-based font service system
US20150058719A1 (en) Method for forming multi-font library and method for displaying different fonts using multi-font library
US9977771B2 (en) System and method for printable document viewer optimization
CN103559271A (en) Method for generating bitmap font library with gray level
US7623130B1 (en) Text rendering with improved command stream operations
JP2014038301A (en) Method for operating character string in an integrated system
JP2010130463A (en) Print data generation apparatus, printing device, and print data processing system
US20150169508A1 (en) Obfuscating page-description language output to thwart conversion to an editable format
CN112395529B (en) Page loading method, device, equipment and storage medium
US10747339B2 (en) Digital ink coding method, digital ink decoding method, digital ink data structure, and method of generating file including digital ink
CN102081736A (en) Equipment and method for extracting enclosing rectangles of characters from portable electronic documents
CN104680197A (en) Method for realizing two-dimensional code zoomed printing of 9-pin printer
JP2007001166A (en) Image processing method, image processing apparatus and program
EP2525283B1 (en) Information processing apparatus, control method, and storage medium
CN105047181A (en) Method and device for displaying characters
CN107193509A (en) A kind of method for realizing any Windows fonts Chinese character printing
US20100017708A1 (en) Information output apparatus, information output method, and recording medium
US9483443B2 (en) Tiled display list
CN102243545A (en) Method for realizing high-efficiency input on electronic ink screen
CN1326071C (en) Electronic file display and treatment method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
DD01 Delivery of document by public notice

Addressee: FEIGE KANGCAI (BEIJING) SOFTWARE TECHNOLOGY CO., LTD.

Document name: Decision of Rejection

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140205