CN104717548B - A kind of set top box dot matrix captions font processing method and processing system - Google Patents
A kind of set top box dot matrix captions font processing method and processing system Download PDFInfo
- Publication number
- CN104717548B CN104717548B CN201510097785.3A CN201510097785A CN104717548B CN 104717548 B CN104717548 B CN 104717548B CN 201510097785 A CN201510097785 A CN 201510097785A CN 104717548 B CN104717548 B CN 104717548B
- Authority
- CN
- China
- Prior art keywords
- font
- data
- dot matrix
- processing
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Controls And Circuits For Display Device (AREA)
- Editing Of Facsimile Originals (AREA)
Abstract
The present invention provides a kind of set top box dot matrix captions font processing method, and this method is:It is single character by string segmentation, single character takes out corresponding dot array data from the dot matrix word library of set top box;Dot array data is passed to dot matrix captions again, following any one or multiple function treatments are carried out to dot matrix subtitle font;Diminution processing is amplified to the font for the dot matrix captions to be shown;Line tilt processing is entered to the font for the dot matrix captions to be shown;Underscore processing is carried out to the font for the dot matrix captions to be shown;Frame processing is carried out to the font for the dot matrix captions to be shown;Word space processing is carried out to the font for the dot matrix captions to be shown.The present invention can only use a set of font, can complete above-mentioned function, be greatly saved memory headroom.
Description
Technical field
The present invention relates to set top box Font processing field, more particularly to a kind of set top box dot matrix captions font processing method and
Processing system.
Background technology
At present, as the development of DTV, top box of digital machine are expanded with popularizing in each corner in the world.At present,
Set top box on the market is fairly simple to raster font processing, and general is exactly to integrate multiple dot matrix word libraries, to realize multiple fonts
The purpose of effect.
With function constantly improve, DTV STB gradually increases subtitle font requirement.At dot matrix subtitle font
Reason system should give birth to;System can be to dot matrix subtitle font zoom, italic, underscore, frame, change word space etc..
Unified font font, and multi-effect only is realized with a set of font, it has been greatly saved memory headroom.
The content of the invention
One of the technical problem to be solved in the present invention, it is to provide a kind of set top box dot matrix captions font processing method, can
To realize multiple fonts effect with same set of raster font, without integrating multiple character libraries.It is unified to realize font, multiple fonts effect
Fruit, save the target of set top box internal memory.
What one of the problem of of the invention, was realized in:A kind of set top box dot matrix captions font processing method, this method tool
Body is:
It is single character by string segmentation, single character takes out corresponding dot array data from the dot matrix word library of set top box;
Dot array data is passed to dot matrix captions again, following any one or multiple function treatments are carried out to dot matrix subtitle font;
Diminution processing is amplified to the font for the dot matrix captions to be shown;
Line tilt processing is entered to the font for the dot matrix captions to be shown;
Underscore processing is carried out to the font for the dot matrix captions to be shown;
Frame processing is carried out to the font for the dot matrix captions to be shown;
Word space processing is carried out to the font for the dot matrix captions to be shown.
Further, the zoom, which is handled, is specially:The dot array data is the dot matrix rectangle that length and width are fixed, then leads to
The wide high and pending dot array data wide high proportion of the target font to be obtained is crossed, pending dot array data is accordingly compared
Example zooms in or out.
Further, the inclination, which is handled, is specially:The inclined degree of font is determined, the inclined degree should be less than dot-matrix
Curtain font original width, is changed into font height by pending set width and is multiplied by inclined degree adding font original width;Then root
According to font incline direction, raster font the second row data offset locations are determined, remaining position is filled with background dot array data;Until
Complete whole font.
Further, the underscore, which is handled, is specially:Underscore grade is determined, the underscore grade highest is no more than
Font height adds 5 pixels;According to underscore grade and underscore thickness determine to need raster font data which
Row is initially added into underscore data, to be covered in former font dot matrix data;If underline position outside font dot matrix data,
Then background data is filled between underscore data and character font data.
Further, the frame, which is handled, is specially:Captions are progressively scanned, are font in dot array data is encountered
The pixel of data, then judge eight point data situation around the pixel, if background data, then fill frame data;Until the word
After all data of body all judge, then frame function is completed;For background data without processing.
Further, the word space, which is handled, is specially:A word space parameter is first passed to, is splicing two font dot matrix numbers
According to when, can access and insert background number before incoming with high, the rectangle data of a width of word space parameter, the data with font dot matrix
According to;So as to carry out the processing of word space.
The second technical problem to be solved by the present invention, it is to provide a kind of set top box dot matrix captions Font processing system, can
To realize multiple fonts effect with same set of raster font, without integrating multiple character libraries.It is unified to realize font, multiple fonts effect
Fruit, save the target of set top box internal memory.
What the two of the problem of of the invention were realized in:A kind of set top box dot matrix captions Font processing system, the system
Including segmentation module, zoom module, italic module, underscore module, frame module and word space module;
The segmentation module:It is single character by string segmentation, single character takes out from the dot matrix word library of set top box
Corresponding dot array data;Dot array data is passed to dot matrix captions again, dot matrix subtitle font is put into zoom module, italic mould
Any one module or multiple modules in block, underscore module, frame module and word space module are handled;
Zoom module is used for:Diminution processing is amplified to the font for the dot matrix captions to be shown;
Italic module is used for:Line tilt processing is entered to the font for the dot matrix captions to be shown;
Underscore module is used for:Underscore processing is carried out to the font for the dot matrix captions to be shown;
Frame module is used for:Frame processing is carried out to the font for the dot matrix captions to be shown;
Word space module is used for:Word space processing is carried out to the font for the dot matrix captions to be shown.
Further, the zoom resume module is specially:The dot array data is the dot matrix rectangle that length and width are fixed,
Then by the wide high and pending dot array data wide high proportion of the target font to be obtained, phase is carried out to pending dot array data
Answer scaling or reduce.
Further, the tilt module, which is handled, is specially:The inclined degree of font is determined, the inclined degree should be less than point
Battle array subtitle font original width, is changed into font height by pending set width and is multiplied by inclined degree adding font original width;So
Afterwards according to font incline direction, raster font the second row data offset locations are determined, remaining position is filled with background dot array data;
Until completing whole font.
Further, the underscore resume module is specially:Underscore grade is determined, the underscore grade highest can not
5 pixels are added more than font height;Determine to need in raster font data according to underscore grade and underscore thickness
Which is initially added into underscore data, to be covered in former font dot matrix data;If underline position is in font dot matrix number
According to outer, then background data is filled between underscore data and character font data.
Further, the frame module, which is handled, is specially:Captions are progressively scanned, are in dot array data is encountered
The pixel of character font data, then judge eight point data situation around the pixel, if background data, then fill frame data;Until
After all data of the font all judge, then frame function is completed;For background data without processing.
Further, the word space resume module is specially:A word space parameter is first passed to, is splicing two font points
During battle array data, it can access and insert the back of the body before incoming with height, the rectangle data of a width of word space parameter, the data with font dot matrix
Scape data;So as to carry out the processing of word space.
The invention has the advantages that:After string data of the present invention is transmitted to dot matrix captions Font processing system, system meeting
According to the processing type transmitted, string data is transmitted to corresponding module;Including zoom module, italic module, underscore
Module, frame module, word space module.It can only use a set of font, can complete above-mentioned function, be greatly saved internal memory
Space.
Brief description of the drawings
Fig. 1 is the inventive method schematic flow sheet.
Fig. 2 is the structured flowchart of the system of the present invention.
Embodiment
Refer to shown in Fig. 1, a kind of set top box dot matrix captions font processing method of the invention, this method is specially:
It is single character by string segmentation, single character takes out corresponding dot array data from the dot matrix word library of set top box;
Dot array data is passed to dot matrix captions again, following any one or multiple function treatments are carried out to dot matrix subtitle font;(i.e.
A kind of processing in handling below, or all processing handled below, or 2, or 3 processing can only be carried out) to all
Character string is obtained after single character splicing after processing.
Diminution processing is amplified to the font for the dot matrix captions to be shown;The zoom is handled:It is described
Dot array data is the dot matrix rectangle that length and width are fixed, then passes through the wide high and pending wide height of dot array data of the target font to be obtained
Ratio, corresponding proportion is carried out to pending dot array data and zoomed in or out.
Line tilt processing is entered to the font for the dot matrix captions to be shown;The inclination is handled:Determine inclining for font
Oblique degree, the inclined degree should be less than dot matrix subtitle font original width, pending set width are changed into font height and is multiplied by
Inclined degree adds font original width;Then according to font incline direction, raster font the second row data offset locations are determined, its
Filled with background dot array data remaining position;Until completing whole font.
Underscore processing is carried out to the font for the dot matrix captions to be shown;The underscore is handled:It is determined that lower stroke
Line grade, the underscore grade highest add 5 pixels no more than font height;It is thick according to underscore grade and underscore
Degree determines to need which of raster font data to be initially added into underscore data, to be covered in former font dot matrix data;
If outside font dot matrix data, background data is filled between underscore data and character font data for underline position.
Frame processing is carried out to the font for the dot matrix captions to be shown;The frame is handled:To captions carry out by
Row scanning, it is the pixel of character font data in dot array data is encountered, then eight point data situation around the pixel is judged, if background
Data, then fill frame data;After all data of the font all judge, then frame function is completed;Not for background data not
Handled.
Word space processing is carried out to the font for the dot matrix captions to be shown.The word space is handled:First it is passed to one
Word space parameter, when splicing two font dot matrix data, it can access with font dot matrix with high, the rectangle of a width of word space parameter
Data, the data have inserted background data before incoming;So as to carry out the processing of word space;
Refer to shown in Fig. 2, a kind of set top box dot matrix captions Font processing system of the invention, it is characterised in that:It is described
System includes segmentation module, zoom module, italic module, underscore module, frame module and word space module;
The segmentation module:It is single character by string segmentation, single character takes out from the dot matrix word library of set top box
Corresponding dot array data;Dot array data is passed to dot matrix captions again, dot matrix subtitle font is put into zoom module, italic mould
Any one module or multiple modules in block, underscore module, frame module and word space module are handled;
Zoom module is used for:Diminution processing is amplified to the font for the dot matrix captions to be shown;
Italic module is used for:Line tilt processing is entered to the font for the dot matrix captions to be shown;
Underscore module is used for:Underscore processing is carried out to the font for the dot matrix captions to be shown;
Frame module is used for:Frame processing is carried out to the font for the dot matrix captions to be shown;
Word space module is used for:Word space processing is carried out to the font for the dot matrix captions to be shown.
The zoom resume module is specially:The dot array data is the dot matrix rectangle that length and width are fixed, then by wanting
The wide high and pending dot array data wide high proportion of the target font of acquisition, corresponding proportion is carried out to pending dot array data and put
Big or diminution.
The tilt module is handled:The inclined degree of font is determined, the inclined degree should be less than dot matrix captions word
Body original width, is changed into font height by pending set width and is multiplied by inclined degree adding font original width;Then according to word
Body incline direction, determines raster font the second row data offset locations, and remaining position is filled with background dot array data;Until completing
Whole font.
The underscore resume module is specially:Underscore grade is determined, the underscore grade highest is no more than font
Highly add 5 pixels;Which determine to need to open in raster font data according to underscore grade and underscore thickness
Begin to add underscore data, to be covered in former font dot matrix data;If underline position outside font dot matrix data, under
Background data is filled between line data and character font data.
The frame module is handled:Captions are progressively scanned, are character font data in dot array data is encountered
Pixel, then judge eight point data situation around the pixel, if background data, then fill frame data;Until the font institute
After there are data all to judge, then frame function is completed;For background data without processing.
The word space resume module is specially:A word space parameter is first passed to, when splicing two font dot matrix data,
It can access and insert background data before incoming with height, the rectangle data of a width of word space parameter, the data with font dot matrix;From
And carry out the processing of word space.
Concatenation module:To obtaining character string after the single character splicing after processing.
In a word, after string data of the present invention is transmitted to dot matrix captions Font processing system, system can be according to the processing transmitted
Type, string data is transmitted to corresponding module;Including zoom module, italic module, underscore module, frame module,
Word space module.It can only use a set of font, can complete above-mentioned function, be greatly saved memory headroom.
The foregoing is only presently preferred embodiments of the present invention, all equivalent changes done according to scope of the present invention patent with
Modification, it should all belong to the covering scope of the present invention.
Claims (8)
- A kind of 1. set top box dot matrix captions font processing method, it is characterised in that:This method is specially:It is single character by string segmentation, single character takes out corresponding dot array data from the dot matrix word library of set top box;Again will Dot array data is passed to dot matrix captions, and following any one or multiple function treatments are carried out to dot matrix subtitle font:Diminution processing is amplified to the font for the dot matrix captions to be shown;Line tilt processing is entered to the font for the dot matrix captions to be shown;Underscore processing is carried out to the font for the dot matrix captions to be shown;Frame processing is carried out to the font for the dot matrix captions to be shown;The frame is handled:Captions are swept line by line Retouch, be the pixel of character font data in dot array data is encountered, then eight point data situation around the pixel judged, if background number According to, then fill frame data;After all data of the font all judge, then frame function is completed;Do not enter for background data Row processing;Word space processing is carried out to the font for the dot matrix captions to be shown.
- A kind of 2. set top box dot matrix captions font processing method according to claim 1, it is characterised in that:The amplification contracting Small processing is specially:The dot array data is the dot matrix rectangle that length and width are fixed, then wide high and treat by the target font to be obtained The dot array data wide high proportion of processing, corresponding proportion is carried out to pending dot array data and zoomed in or out;At the inclination Reason is specially:The inclined degree of font is determined, pending set width is changed into font height is multiplied by inclined degree adding word Body original width;Then according to font incline direction, raster font the second row data offset locations, remaining position background dot are determined Battle array data filling;Until completing whole font.
- A kind of 3. set top box dot matrix captions font processing method according to claim 1, it is characterised in that:The underscore Processing is specially:Underscore grade is determined, the underscore grade highest adds 5 pixels no more than font height;According to Underscore grade and underscore thickness determine to need which of raster font data to be initially added into underscore data, with covering In former font dot matrix data;If underline position is outside font dot matrix data, between underscore data and character font data It is filled background data.
- A kind of 4. set top box dot matrix captions font processing method according to claim 1, it is characterised in that:The word space Processing is specially:First be passed to a word space parameter, when splice two font dot matrix data, can access with font dot matrix with height, The rectangle data of a width of word space parameter, the data have inserted background data before incoming;So as to carry out the processing of word space.
- A kind of 5. set top box dot matrix captions Font processing system, it is characterised in that:The system includes segmentation module, zoom Module, italic module, underscore module, frame module and word space module;The segmentation module:It is single character by string segmentation, single character takes out accordingly from the dot matrix word library of set top box Dot array data;Dot array data is passed to dot matrix captions again, by dot matrix subtitle font be put into zoom module, italic module, under Line module, frame module and any one module in word space module or multiple modules are handled;Zoom module is used for:Diminution processing is amplified to the font for the dot matrix captions to be shown;Italic module is used for:Line tilt processing is entered to the font for the dot matrix captions to be shown;Underscore module is used for:Underscore processing is carried out to the font for the dot matrix captions to be shown;Frame module is used for:Frame processing is carried out to the font for the dot matrix captions to be shown;The frame module is handled: Captions are progressively scanned, is the pixel of character font data in dot array data is encountered, then judges eight point datas around the pixel Situation, if background data, then fill frame data;After all data of the font all judge, then frame function is completed;No Be background data without processing;Word space module is used for:Word space processing is carried out to the font for the dot matrix captions to be shown.
- A kind of 6. set top box dot matrix captions Font processing system according to claim 5, it is characterised in that:The amplification contracting Little module is handled:The dot array data is the dot matrix rectangle that length and width are fixed, then passes through the wide height of target font to be obtained With pending dot array data wide high proportion, corresponding proportion is carried out to pending dot array data and zoomed in or out;It is described oblique Module is handled:The inclined degree of font is determined, pending set width is changed into font height is multiplied by inclination journey Degree adds font original width;Then according to font incline direction, raster font the second row data offset locations, remaining position are determined Filled with background dot array data;Until completing whole font.
- A kind of 7. set top box dot matrix captions Font processing system according to claim 5, it is characterised in that:The underscore Resume module is specially:Underscore grade is determined, the underscore grade highest adds 5 pixels no more than font height; Determine to need according to underscore grade and underscore thickness which of raster font data to be initially added into underscore data, with It is covered in former font dot matrix data;If underline position is outside font dot matrix data, underscore data and character font data Between be filled background data.
- A kind of 8. set top box dot matrix captions Font processing system according to claim 5, it is characterised in that:The word space Resume module is specially:A word space parameter is first passed to, when splicing two font dot matrix data, can be accessed same with font dot matrix Height, the rectangle data of a width of word space parameter, the data have inserted background data before incoming;So as to carry out the place of word space Reason.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510097785.3A CN104717548B (en) | 2015-03-05 | 2015-03-05 | A kind of set top box dot matrix captions font processing method and processing system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510097785.3A CN104717548B (en) | 2015-03-05 | 2015-03-05 | A kind of set top box dot matrix captions font processing method and processing system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104717548A CN104717548A (en) | 2015-06-17 |
CN104717548B true CN104717548B (en) | 2017-11-24 |
Family
ID=53416429
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510097785.3A Active CN104717548B (en) | 2015-03-05 | 2015-03-05 | A kind of set top box dot matrix captions font processing method and processing system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104717548B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108242211A (en) * | 2016-12-26 | 2018-07-03 | 航天信息股份有限公司 | Processing method, device and the board units of dot character |
CN109218845B (en) * | 2017-07-01 | 2020-09-04 | 武汉斗鱼网络科技有限公司 | Method, storage medium, electronic device and system for optimizing bullet screen display effect |
CN108174279B (en) * | 2017-12-07 | 2020-07-17 | 四川迪佳通电子有限公司 | Set top box subtitle display method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101510421A (en) * | 2009-01-16 | 2009-08-19 | 北京中星微电子有限公司 | Method and apparatus for regulating dot-character size, and embedded system |
CN101931769A (en) * | 2010-08-24 | 2010-12-29 | 福建新大陆通信科技股份有限公司 | Method for amplifying and displaying menu font of set top box of digital television |
CN101968814A (en) * | 2010-10-29 | 2011-02-09 | 四川长虹电器股份有限公司 | Dot matrix font manufacturing method |
CN102117266A (en) * | 2009-12-31 | 2011-07-06 | 北京谊安医疗系统股份有限公司 | Method and device for processing character pitch |
CN103186507A (en) * | 2011-12-31 | 2013-07-03 | 北京大唐高鸿软件技术有限公司 | Dot matrix font library processing method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4552426B2 (en) * | 2003-11-28 | 2010-09-29 | カシオ計算機株式会社 | Display control apparatus and display control processing program |
-
2015
- 2015-03-05 CN CN201510097785.3A patent/CN104717548B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101510421A (en) * | 2009-01-16 | 2009-08-19 | 北京中星微电子有限公司 | Method and apparatus for regulating dot-character size, and embedded system |
CN102117266A (en) * | 2009-12-31 | 2011-07-06 | 北京谊安医疗系统股份有限公司 | Method and device for processing character pitch |
CN101931769A (en) * | 2010-08-24 | 2010-12-29 | 福建新大陆通信科技股份有限公司 | Method for amplifying and displaying menu font of set top box of digital television |
CN101968814A (en) * | 2010-10-29 | 2011-02-09 | 四川长虹电器股份有限公司 | Dot matrix font manufacturing method |
CN103186507A (en) * | 2011-12-31 | 2013-07-03 | 北京大唐高鸿软件技术有限公司 | Dot matrix font library processing method |
Also Published As
Publication number | Publication date |
---|---|
CN104717548A (en) | 2015-06-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11126888B2 (en) | Target recognition method and apparatus for a deformed image | |
CN110334585A (en) | Table recognition method, apparatus, computer equipment and storage medium | |
CN104717548B (en) | A kind of set top box dot matrix captions font processing method and processing system | |
KR20190058366A (en) | Method and apparatus for adapting feature data in convolutional neural network | |
US10991065B2 (en) | Methods and systems for processing graphics | |
US8787671B2 (en) | Character recognition preprocessing method and apparatus | |
CN104966092B (en) | A kind of image processing method and device | |
US9070034B2 (en) | Method and system for correcting QR code image | |
CN110622177A (en) | Instance partitioning | |
WO2020258491A1 (en) | Universal character recognition method, apparatus, computer device, and storage medium | |
US10417516B2 (en) | System and method for preprocessing images to improve OCR efficacy | |
US20130028518A1 (en) | Image processing device determining attributes of regions | |
JP5254250B2 (en) | Method and system for generating boundaries in the process of rasterizing vector graphics, and method for manufacturing the system | |
CN102360505A (en) | Graphical verification code generation method | |
US20220343507A1 (en) | Process of Image | |
CN104796649A (en) | 3D projection method and device | |
US7868888B2 (en) | Course grid aligned counters | |
CN111310082B (en) | Page display method and device | |
CN115423901A (en) | Method and device for drawing canvas based on json segment | |
CN103373044B (en) | Method and device for network-attached processing | |
CN114373117A (en) | Target detection method, device and system | |
US20080036775A1 (en) | Method for generating characters | |
CN109903216B (en) | System and method for realizing positioning image dot matrix extraction based on FPGA platform | |
CN109690572A (en) | The method for generating the output of centre scan image using overscanning RIP | |
CN113793264A (en) | Archive image processing method and system based on convolution model and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB03 | Change of inventor or designer information | ||
CB03 | Change of inventor or designer information |
Inventor after: Zhang Honghui Inventor after: Chen Xiaohui Inventor after: Yuan Wei Inventor after: Shen Shaoyang Inventor before: Ye Junyong |
|
GR01 | Patent grant | ||
GR01 | Patent grant |