CN103531176B - A kind of font display optimization method and system of Android terminal - Google Patents

A kind of font display optimization method and system of Android terminal Download PDF

Info

Publication number
CN103531176B
CN103531176B CN201310171292.0A CN201310171292A CN103531176B CN 103531176 B CN103531176 B CN 103531176B CN 201310171292 A CN201310171292 A CN 201310171292A CN 103531176 B CN103531176 B CN 103531176B
Authority
CN
China
Prior art keywords
pixel
value
gray
font
vertical line
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
CN201310171292.0A
Other languages
Chinese (zh)
Other versions
CN103531176A (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.)
TCL Corp
Original Assignee
TCL Corp
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 TCL Corp filed Critical TCL Corp
Priority to CN201310171292.0A priority Critical patent/CN103531176B/en
Publication of CN103531176A publication Critical patent/CN103531176A/en
Application granted granted Critical
Publication of CN103531176B publication Critical patent/CN103531176B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

The invention discloses the font display optimization method and system of a kind of Android terminal, wherein, the font display optimization method of described Android terminal is after carrying out rendering obtain font pixel grey scale value matrix as employing FreeType, in described font pixel grey scale value matrix, find out horizontal line, vertical line and horizontal line vertical line jointly render the gray-value pixel of generation, and set first, second Gray-scale value, according to first, second gray threshold, above-mentioned gray-value pixel is carried out binary conversion treatment, export the font pixel grey scale figure matrix after optimizing.It can improve because font renders the unintelligible phenomenon of font that the gray noise of generation causes, under conditions of not promoting hardware cost, font display resolution can be effectively improved, make the closely viewing effect of the font in Android terminal apparent, there is good popularizing application prospect.

Description

A kind of font display optimization method and system of Android terminal
Technical field
The present invention relates to Android applied technical field, particularly relate to the font display optimization method and system of a kind of Android terminal.
Background technology
Android television set is usually by arm processor as core, is integrated with multimedia hardware decoding function.Attainable function includes: internet browsing, Online Video broadcasting etc., abundant internet application such as QQ and game also can be installed, network or local high-definition movie are play in decoding, people are made to transfer to browse on liquid crystal TV set, alternately by more rich internet content, rather than be limited only to the less screen of computer, and obtain good use impression.
Android TV is when closely watching, and font shows smudgy.As it is shown in figure 1, it " is believed " for choosing a certain word, closely obtain font photo with high definition camera shooting.As seen from the figure, watching in pixel scale, there is the bright spot of similar shade at font edge.Fig. 2 is the memory image grab that this word renders, it can be seen that there are the lines that many gray scales are uneven at this word edge, these cause font unintelligible just.The uneven lines of this gray value are because vector fonts and render produced by mode.As it can be seen, 11 render the gray-value pixel of generation for horizontal line, 12 render the gray-value pixel of generation for vertical line, and 13 is the gray-value pixel that horizontal line and vertical line render generation jointly.
In simple terms, font can be divided into vector fonts and raster font by implementation.In vector fonts, each font is described by mathematic curve, and this font, zooming in and out when, can well keep local edge;And raster font to be dot chart represent, this font display speed is fast, and not scaling when, effect is fine, but once scales, and the sawtooth sense at edge is clearly.
FreeType storehouse is completely free (increasing income), a high-quality transplantable font engine, and it provides unified interface to access multiple fonts formatted file, supports monochrome bitmap, the rendering of anti-aliasing bitmap.FreeType is integrated in system by Android, for Rendering type.
Android font uses vector fonts, uses FreeType to render, is loaded by skia, in write video memory, finally completes screen and shows.Under different font sizes, all of point can be zoomed to suitable position by FreeType, then determines curve.When the integral multiple that the size of unicursal is not pixel when, certainly exist that limit, edge and do not occupy column of pixels, or be pressed in the centre of two row pixels, thus cause the lines of the Lycoperdon polymorphum Vitt shown in Fig. 2.
At present, vector fonts is optimized by android system, and it is mobile phone and panel computer that main cause is probably the equipment great majority of loading android system.At present mobile phone the most on the market, the android terminal device such as panel computer, owing to screen size is little, add that resolution is higher, actual display effect is outstanding.For liquid crystal display, display precision is by PPI(PS: the number of pixels that per inch is had) determine, usual PPI is more than 300, is difficult to the difference finding out in pixel, and current main flow handheld device PPI is all close to even more than 300.But giant-screen equipment this for TV, due to cost and technological reason, wants that the PPI reaching 300 is extremely difficult, the TV PPI of 55 cun of 1080P resolution only has about 50, being far smaller than the equipment such as mobile phone plane plate, display effect can differ from a lot, and closely viewing can clearly.
In order to improve the fineness that font is closely watched, can be realized by the resolution promoting screen.But the method is limited to cost and technological level, it is difficult to promote.
In view of this, prior art haves much room for improvement and improves.
Summary of the invention
In view of the deficiencies in the prior art, present invention aim at providing the font display optimization method and system of a kind of Android terminal.Aim to solve the problem that font is not shown by existing Android terminal to be optimized, cause font to show the problem being limited to screen resolution.
Technical scheme is as follows:
A kind of font display optimization method of Android terminal, after carrying out rendering obtain font pixel grey scale value matrix as employing FreeType, shows font and is optimized process, it is characterised in that described optimization method comprises the following steps:
A, preset the first gray threshold T1 and the second gray threshold T2, and T1 is more than T2;
B, described font pixel grey scale value matrix is found out horizontal line render the gray-value pixel of generation and vertical line renders the gray-value pixel of generation, respectively it is carried out binary conversion treatment, the gray value of the order pixel more than the first gray threshold T1 is set to 255, and the gray value of the pixel less than the second gray threshold T2 is set to 0;
C, add up the number of pixel shared by every horizontal line stroke, and will appear from most numbers and be set as standard horizontal line stroke weight value;Equally, add up the number of pixel shared by every vertical line stroke, and will appear from most numbers and be set as standard vertical line stroke weight value;
D, gray value horizontal line between T1 and T2 is rendered to the gray-value pixel of generation, the thickness value of the main outline of the horizontal direction at its place is compared with standard horizontal line stroke weight value: if more than described standard horizontal line stroke weight value, then the gray value of all of pixel in the main outline of described horizontal direction is set to 0, is otherwise provided as 255;Equally, the thickness value of the main outline that gray value vertical line between T1 and T2 renders the vertical direction at the gray-value pixel place of generation compares with standard vertical line stroke weight value: if more than described standard vertical line stroke weight value, then the gray value of all of pixel in the main outline of described vertical direction is set to 0, is otherwise provided as 255;
E, in described font pixel grey scale value matrix, find out horizontal line and vertical line renders the gray-value pixel of generation jointly, and judge each pixel before and after it: if wherein the gray value of any one pixel is 0 or 255, then the gray-value pixel that horizontal line and vertical line render generation jointly does not processes;Otherwise process according to the vertical line of its correspondence, the font pixel grey scale figure matrix after finally output optimizes.
The font display optimization method of described Android terminal, it is characterised in that find out horizontal line in described step B in described font pixel grey scale value matrix and render the gray-value pixel of generation and specifically include:
Pixel in A1, the most successively traversal font pixel grey scale value matrix;
A2, from above-mentioned pixel, isolate the main outline pixel of background and font;
A3, according to the most equal characteristic of straight line gray value, from remaining pixel, isolate oblique line pixel;
A4, set a computer, record the number of continuous identical pixels, i.e. horizontal line and render the gray-value pixel of generation.
The font display optimization method of described Android terminal, wherein, adds up the number of pixel shared by every horizontal line stroke and specifically includes in described step C:
Horizontal line after processing is rendered the gray-value pixel of generation, looks for its main outline pixel up or down, record after merger, obtain the number of pixel shared by the horizontal line stroke that described gray-value pixel is corresponding.
The font display optimization method of described Android terminal, wherein, in described step A, the first gray threshold T1 is 170;Second gray threshold T2 is 85.
The font display optimization system of a kind of Android terminal, after carrying out rendering obtain font pixel grey scale value matrix as employing FreeType, shows font and is optimized process, and wherein, described system includes:
Threshold value setting module, is used for presetting the first gray threshold T1 and the second gray threshold T2, and T1 is more than T2;
First pixel optimizes module, the gray-value pixel of generation is rendered and vertical line renders the gray-value pixel of generation for finding out horizontal line in described font pixel grey scale value matrix, respectively it is carried out binary conversion treatment, the gray value of the order pixel more than the first gray threshold T1 is set to 255, and the gray value of the pixel less than the second gray threshold T2 is set to 0;
Standard stroke determines module, for adding up the number of pixel shared by every horizontal line stroke, and will appear from most numbers and is set as standard horizontal line stroke weight value;Equally, add up the number of pixel shared by every vertical line stroke, and will appear from most numbers and be set as standard vertical line stroke weight value;
Stroke optimizes module, for rendering the gray-value pixel of generation for gray value horizontal line between T1 and T2, the thickness value of the main outline of the horizontal direction at its place is compared with standard horizontal line stroke weight value: if more than described standard horizontal line stroke weight value, then the gray value of all of pixel in the main outline of described horizontal direction is set to 0, is otherwise provided as 255;Equally, the thickness value of the main outline that gray value vertical line between T1 and T2 renders the vertical direction at the gray-value pixel place of generation compares with standard vertical line stroke weight value: if more than described standard vertical line stroke weight value, then the gray value of all of pixel in the main outline of described vertical direction is set to 0, is otherwise provided as 255;
Second pixel optimizes module, for finding out horizontal line in described font pixel grey scale value matrix and vertical line renders the gray-value pixel of generation jointly, and judge each pixel before and after it: if wherein the gray value of any one pixel is 0 or 255, then the gray-value pixel that horizontal line and vertical line render generation jointly does not processes;Otherwise process according to the vertical line of its correspondence, the font pixel grey scale figure matrix after finally output optimizes.
The font display optimization system of described Android terminal, wherein, described first gray threshold T1 is 170;Second gray threshold T2 is 85.
The font display optimization system of described Android terminal, wherein, described Android terminal is Android television set.
Beneficial effect: the font display optimization method and system of the Android terminal of the present invention, can improve because font renders the unintelligible phenomenon of font that the gray noise of generation causes, under conditions of not promoting hardware cost, font display resolution can be effectively improved, make the closely viewing effect of the font in Android terminal apparent, there is good popularizing application prospect.
Accompanying drawing explanation
Fig. 1 is the photo of the example of display font in existing Android terminal.
Fig. 2 is the schematic diagram of the memory image grab that font renders through word described in Fig. 1.
Fig. 3 is the flow chart of the font display optimization method of the Android terminal of the present invention.
Fig. 4 is the schematic diagram of the memory image grab after the font display optimization method of the Android terminal of the present invention processes of the font in Fig. 1.
Fig. 5 is the photo after the font display optimization method of the Android terminal of the present invention processes of the font in Fig. 1.
Fig. 6 is the structured flowchart of the font display optimization system of the Android terminal of the present invention.
Detailed description of the invention
The present invention provides the font display optimization method and system of a kind of Android terminal, and for making the purpose of the present invention, technical scheme and effect clearer, clear and definite, the present invention is described in more detail below.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Chinese-character stroke is divided into horizontal stroke, perpendicular, skims, right-falling stroke, puts five kinds.Wherein horizontal and perpendicular is straight line, skims, and right-falling stroke, point is oblique line.Based on liquid crystal display principle, for 256 grades of grayscale font, each pixel of straight line is to be represented by single value, usually 255, and oblique line is in order to avoid sawtooth sense, can with different gray values represent pixel carry out progressive excessively.
From Fig. 2 analysis, render the straight line of generation through vector, be not pure color, but have the line of aberration.Wherein background pixel point gray value is 0, and ater pixel gray value is 255, and this part is font principal outline, and those colo(u)r streaks of non-255, some is actual stroke lines, and some is to render to produce unnecessary information.Oblique line represents due to inherently gray scale, so impact is little after rendering.Therefore, the problem that present invention mainly solves is: processes horizontal stroke, the half-tone information that perpendicular stroke renders, retains and skim, right-falling stroke, the half-tone information on some stroke.
Being learnt by analysis, anyhow except straight line intersection on stroke, gray value is identical, and the gray value on oblique line is progressive excessive, and gray value and the consecutive points of each pixel are different from.According to this characteristic, the invention provides a kind of font display optimization method of Android terminal, after carrying out rendering obtain font pixel grey scale value matrix as employing FreeType, font is shown and is optimized process, as it is shown on figure 3, described optimization method comprises the following steps:
S1, preset the first gray threshold T1 and the second gray threshold T2, and T1 is more than T2;
S2, described font pixel grey scale value matrix is found out horizontal line render the gray-value pixel of generation and vertical line renders the gray-value pixel of generation, respectively it is carried out binary conversion treatment, the gray value of the order pixel more than the first gray threshold T1 is set to 255, and the gray value of the pixel less than the second gray threshold T2 is set to 0;
S3, add up the number of pixel shared by every horizontal line stroke, and will appear from most numbers and be set as standard horizontal line stroke weight value;Equally, add up the number of pixel shared by every vertical line stroke, and will appear from most numbers and be set as standard vertical line stroke weight value;
S4, gray value horizontal line between T1 and T2 is rendered to the gray-value pixel of generation, the thickness value of the main outline of the horizontal direction at its place is compared with standard horizontal line stroke weight value: if more than described standard horizontal line stroke weight value, then the gray value of all of pixel in the main outline of described horizontal direction is set to 0, is otherwise provided as 255;Equally, the thickness value of the main outline that gray value vertical line between T1 and T2 renders the vertical direction at the gray-value pixel place of generation compares with standard vertical line stroke weight value: if more than described standard vertical line stroke weight value, then the gray value of all of pixel in the main outline of described vertical direction is set to 0, is otherwise provided as 255;
S5, in described font pixel grey scale value matrix, find out horizontal line and vertical line renders the gray-value pixel of generation jointly, and judge each pixel before and after it: if wherein the gray value of any one pixel is 0 or 255, then the gray-value pixel that horizontal line and vertical line render generation jointly does not processes;Otherwise process according to the vertical line of its correspondence, the font pixel grey scale figure matrix after finally output optimizes.
Describe in detail for above-mentioned steps separately below.
Described step S1 is for presetting the first gray threshold T1 and the second gray threshold T2, and T1 is more than T2.Horizontal line or vertical line are carried out set by binary conversion treatment by the first gray threshold T1 and the second gray threshold T2 in order to follow-up.It should be appreciated that the Research on threshold selection that image binaryzation processes has many kinds, have based on grey level histogram, based on local edge, use wavelet transformation etc. method.These methods are unsuitable for the problem that the present invention is directed to.The present invention is for the requirement after binaryzation: the stroke weight of the Chinese character after binaryzation must be consistent, it is necessary to keeps the seriality of Chinese character, integrity, it is impossible to occur lacking stroke phenomenon.In an embodiment of the present invention, for the first gray threshold T1, it is set as 170(i.e. 255*2/3=170);Second gray threshold T2 is set as 85(i.e. 255*1/3=85).
Described step S2 is to find out horizontal line in described font pixel grey scale value matrix to render the gray-value pixel of generation and vertical line renders the gray-value pixel of generation, respectively it is carried out binary conversion treatment: the gray value of the order pixel more than the first gray threshold T1 is set to 255, and the gray value of the pixel less than the second gray threshold T2 is set to 0.
In the present embodiment, in described font pixel grey scale value matrix, find out horizontal line render the gray-value pixel of generation and specifically include:
Pixel in S11, the most successively traversal font pixel grey scale value matrix;
S12, from above-mentioned pixel, isolate the main outline pixel of background and font;Whether the gray value i.e. judging pixel is 0 or 255, if it is thinks that described pixel is the main outline pixel of background and font;
S13, according to the most equal characteristic of straight line gray value, from remaining pixel, isolate oblique line pixel;
S14, set a computer, record the number of continuous identical pixels, i.e. horizontal line and render the gray-value pixel of generation.
Similarly, in the present embodiment, in described font pixel grey scale value matrix, find out vertical line render the gray-value pixel of generation and specifically include:
Pixel in S21, the most successively traversal font pixel grey scale value matrix;
S22, from above-mentioned pixel, isolate the main outline pixel of background and font;
S23, according to the most equal characteristic of straight line gray value, from remaining pixel, isolate oblique line pixel;
S24, set a computer, record the number of continuous identical pixels, i.e. vertical line and render the gray-value pixel of generation.
Described step S3 is the number of pixel shared by every horizontal line stroke of statistics, and will appear from most numbers and be set as standard horizontal line stroke weight value;Equally, add up the number of pixel shared by every vertical line stroke, and will appear from most numbers and be set as standard vertical line stroke weight value.In simple terms, if most horizontal line includes 3 pixels, then standard horizontal line stroke weight value is set as 3 pixels (representing thickness value by the number of pixel).Wherein, add up the number of pixel shared by every horizontal line stroke to specifically include: the horizontal line after processing renders the gray-value pixel of generation, look for its main outline pixel up or down, record after merger, obtain the number of pixel shared by the horizontal line stroke that described gray-value pixel is corresponding.Identical mode is also adopted by for standard vertical line stroke weight value, consequently, it is possible to just can get the stroke weight value of standard vertical line and horizontal line.
Described step S4 is gray-value pixel gray value horizontal line between T1 and T2 being rendered to generation, the thickness value of the main outline of the horizontal direction at its place is compared with standard horizontal line stroke weight value: if more than described standard horizontal line stroke weight value, then the gray value of all of pixel in the main outline of described horizontal direction is set to 0, is otherwise provided as 255;Equally, the thickness value of the main outline that gray value vertical line between T1 and T2 renders the vertical direction at the gray-value pixel place of generation compares with standard vertical line stroke weight value: if more than described standard vertical line stroke weight value, then the gray value of all of pixel in the main outline of described vertical direction is set to 0, is otherwise provided as 255.
Above-mentioned process is the gray-value pixel individually rendering generation for horizontal line or vertical line, and here is that the gray-value pixel that horizontal line and vertical line render generation jointly processes.I.e. step S5, in described font pixel grey scale value matrix, find out horizontal line and vertical line renders the gray-value pixel of generation jointly, and judge each pixel before and after it: if wherein the gray value of any one pixel is 0 or 255, then the gray-value pixel that horizontal line and vertical line render generation jointly does not processes;Otherwise process according to the vertical line of its correspondence, the font pixel grey scale figure matrix after finally output optimizes.In simple terms, horizontal line and vertical line are rendered jointly to the gray value of the gray-value pixel of generation, it is different from the gray value of horizontal line or vertical line, by judging whether the gray value of any pixel is 0 or 255 before and after it, it is not processed, otherwise carry out processing that (if vertical line is set to 255, horizontal line and vertical line jointly render the gray value of the gray-value pixel of generation and be also set to 255 according to the vertical line of its correspondence;Vertical line is set to 0, and it sets to 0 the most therewith).
In the present embodiment, when we are selected in vertical line (i.e. process vertical line and render the gray-value pixel of generation), process horizontal line and vertical line render the gray-value pixel (after horizontal line has processed) of generation jointly, consequently, it is possible to just will not be disturbed to horizontal line result, treatment effect is preferable.Finally, on the font pixel grey scale figure matrix after the optimization of output to skia after, loaded by skia, write video memory in, complete screen and show.
Fig. 4 is the memory image grab after this paper algorithm process, it can be seen that the horizontal line of " believing ", and the gray value of vertical line has been disposed off (compared with Fig. 2), and the gray value of oblique line is retained.The phenomenons such as Fig. 5 is the schematic diagram of the high definition amplification of display effect, compares with Fig. 1, bright spot, shade have had the biggest improvement, definition to substantially increase.
Present invention also offers the font display optimization system of a kind of Android terminal, after carrying out rendering obtain font pixel grey scale value matrix as employing FreeType, show font and be optimized process, as shown in Figure 6, described system includes:
Threshold value setting module 100, is used for presetting the first gray threshold T1 and the second gray threshold T2, and T1 is more than T2;
First pixel optimizes module 200, the gray-value pixel of generation is rendered and vertical line renders the gray-value pixel of generation for finding out horizontal line in described font pixel grey scale value matrix, respectively it is carried out binary conversion treatment, the gray value of the order pixel more than the first gray threshold T1 is set to 255, and the gray value of the pixel less than the second gray threshold T2 is set to 0;
Standard stroke determines module 300, for adding up the number of pixel shared by every horizontal line stroke, and will appear from most numbers and is set as standard horizontal line stroke weight value;Equally, add up the number of pixel shared by every vertical line stroke, and will appear from most numbers and be set as standard vertical line stroke weight value;
Stroke optimizes module 400, for rendering the gray-value pixel of generation for gray value horizontal line between T1 and T2, the thickness value of the main outline of the horizontal direction at its place is compared with standard horizontal line stroke weight value: if more than described standard horizontal line stroke weight value, then the gray value of all of pixel in the main outline of described horizontal direction is set to 0, is otherwise provided as 255;Equally, the thickness value of the main outline that gray value vertical line between T1 and T2 renders the vertical direction at the gray-value pixel place of generation compares with standard vertical line stroke weight value: if more than described standard vertical line stroke weight value, then the gray value of all of pixel in the main outline of described vertical direction is set to 0, is otherwise provided as 255;
Second pixel optimizes module 500, for finding out horizontal line in described font pixel grey scale value matrix and vertical line renders the gray-value pixel of generation jointly, and judge each pixel before and after it: if wherein the gray value of any one pixel is 0 or 255, then the gray-value pixel that horizontal line and vertical line render generation jointly does not processes;Otherwise process according to the vertical line of its correspondence, the font pixel grey scale figure matrix after finally output optimizes.
Because the details that is embodied as of above-mentioned module has all been described in detail in the font display optimization method of Android terminal, the most just repeat no more.
Further, in an embodiment of the present invention, described Android terminal can be Android television set, giant-screen panel computer etc. with android system.
In sum, the font display optimization method and system of the Android terminal of the present invention, wherein, the font display optimization method of described Android terminal is after carrying out rendering obtain font pixel grey scale value matrix as employing FreeType, in described font pixel grey scale value matrix, find out horizontal line, vertical line and horizontal line vertical line jointly render the gray-value pixel of generation, and set first, second Gray-scale value, according to first, second gray threshold, above-mentioned gray-value pixel is carried out binary conversion treatment, export the font pixel grey scale figure matrix after optimizing.It can improve because font renders the unintelligible phenomenon of font that the gray noise of generation causes, under conditions of not promoting hardware cost, font display resolution can be effectively improved, make the closely viewing effect of the font in Android terminal apparent, there is good popularizing application prospect.
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can be improved according to the above description or convert, all these modifications and variations all should belong to the protection domain of claims of the present invention.

Claims (7)

1. a font display optimization method for Android terminal, after carrying out rendering obtain font pixel grey scale value matrix as employing FreeType, shows font and is optimized process, it is characterised in that described optimization method comprises the following steps:
A, preset the first gray threshold T1 and the second gray threshold T2, and T1 is more than T2;
B, described font pixel grey scale value matrix is found out horizontal line render the gray-value pixel of generation and vertical line renders the gray-value pixel of generation, respectively it is carried out binary conversion treatment, the gray value of the order pixel more than the first gray threshold T1 is set to 255, and the gray value of the pixel less than the second gray threshold T2 is set to 0;
C, add up the number of pixel shared by every horizontal line stroke, and will appear from most numbers and be set as standard horizontal line stroke weight value;Equally, add up the number of pixel shared by every vertical line stroke, and will appear from most numbers and be set as standard vertical line stroke weight value;
D, gray value horizontal line between T1 and T2 is rendered to the gray-value pixel of generation, the thickness value of the main outline of the horizontal direction at its place is compared with standard horizontal line stroke weight value: if more than described standard horizontal line stroke weight value, then the gray value of all of pixel in the main outline of described horizontal direction is set to 0, is otherwise provided as 255;Equally, the thickness value of the main outline that gray value vertical line between T1 and T2 renders the vertical direction at the gray-value pixel place of generation compares with standard vertical line stroke weight value: if more than described standard vertical line stroke weight value, then the gray value of all of pixel in the main outline of described vertical direction is set to 0, is otherwise provided as 255;
E, in described font pixel grey scale value matrix, find out horizontal line and vertical line renders the gray-value pixel of generation jointly, and judge each pixel before and after it: if wherein the gray value of any one pixel is 0 or 255, then the gray-value pixel that horizontal line and vertical line render generation jointly does not processes;Otherwise process according to the vertical line of its correspondence, the font pixel grey scale figure matrix after finally output optimizes;The vertical line of described correspondence carries out process and refers to: when the gray value of any one pixel described is 0 ~ 255, if it is 255 that vertical line renders the gray value of the pixel of generation, then arranges described horizontal line and the gray value of pixel that vertical line renders generation jointly is 255;If it is 0 that vertical line renders the gray value of the pixel of generation, then described horizontal line is set and the gray value of pixel that vertical line renders generation jointly is 0.
The font display optimization method of Android terminal the most according to claim 1, it is characterised in that find out horizontal line in described step B in described font pixel grey scale value matrix and render the gray-value pixel of generation and specifically include:
Pixel in A1, the most successively traversal font pixel grey scale value matrix;
A2, from above-mentioned pixel, isolate the main outline pixel of background and font;
A3, according to the most equal characteristic of straight line gray value, from remaining pixel, isolate oblique line pixel;
A4, set a computer, record the number of continuous identical pixels, i.e. horizontal line and render the gray-value pixel of generation.
3. according to the font display optimization method of the Android terminal described in claim 1, it is characterised in that described step C is added up the number of pixel shared by every horizontal line stroke and specifically includes:
Horizontal line after processing is rendered the gray-value pixel of generation, looks for its main outline pixel up or down, record after merger, obtain the number of pixel shared by the horizontal line stroke that described gray-value pixel is corresponding.
4., according to the font display optimization method of the Android terminal described in claim 1, it is characterised in that in described step A, the first gray threshold T1 is 170;Second gray threshold T2 is 85.
5. a font display optimization system for Android terminal, after carrying out rendering obtain font pixel grey scale value matrix as employing FreeType, shows font and is optimized process, it is characterised in that described system includes:
Threshold value setting module, is used for presetting the first gray threshold T1 and the second gray threshold T2, and T1 is more than T2;
First pixel optimizes module, the gray-value pixel of generation is rendered and vertical line renders the gray-value pixel of generation for finding out horizontal line in described font pixel grey scale value matrix, respectively it is carried out binary conversion treatment, the gray value of the order pixel more than the first gray threshold T1 is set to 255, and the gray value of the pixel less than the second gray threshold T2 is set to 0;
Standard stroke determines module, for adding up the number of pixel shared by every horizontal line stroke, and will appear from most numbers and is set as standard horizontal line stroke weight value;Equally, add up the number of pixel shared by every vertical line stroke, and will appear from most numbers and be set as standard vertical line stroke weight value;
Stroke optimizes module, for rendering the gray-value pixel of generation for gray value horizontal line between T1 and T2, the thickness value of the main outline of the horizontal direction at its place is compared with standard horizontal line stroke weight value: if more than described standard horizontal line stroke weight value, then the gray value of all of pixel in the main outline of described horizontal direction is set to 0, is otherwise provided as 255;Equally, the thickness value of the main outline that gray value vertical line between T1 and T2 renders the vertical direction at the gray-value pixel place of generation compares with standard vertical line stroke weight value: if more than described standard vertical line stroke weight value, then the gray value of all of pixel in the main outline of described vertical direction is set to 0, is otherwise provided as 255;
Second pixel optimizes module, for finding out horizontal line in described font pixel grey scale value matrix and vertical line renders the gray-value pixel of generation jointly, and judge each pixel before and after it: if wherein the gray value of any one pixel is 0 or 255, then the gray-value pixel that horizontal line and vertical line render generation jointly does not processes;Otherwise process according to the vertical line of its correspondence, the font pixel grey scale figure matrix after finally output optimizes;The vertical line of described correspondence carries out process and refers to: when the gray value of any one pixel described is 0 ~ 255, if it is 255 that vertical line renders the gray value of the pixel of generation, then arranges described horizontal line and the gray value of pixel that vertical line renders generation jointly is 255;If it is 0 that vertical line renders the gray value of the pixel of generation, then described horizontal line is set and the gray value of pixel that vertical line renders generation jointly is 0.
The font display optimization system of Android terminal the most according to claim 5, it is characterised in that described first gray threshold T1 is 170;Second gray threshold T2 is 85.
The font display optimization system of Android terminal the most according to claim 5, it is characterised in that described Android terminal is Android television set.
CN201310171292.0A 2013-05-10 2013-05-10 A kind of font display optimization method and system of Android terminal Expired - Fee Related CN103531176B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310171292.0A CN103531176B (en) 2013-05-10 2013-05-10 A kind of font display optimization method and system of Android terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310171292.0A CN103531176B (en) 2013-05-10 2013-05-10 A kind of font display optimization method and system of Android terminal

Publications (2)

Publication Number Publication Date
CN103531176A CN103531176A (en) 2014-01-22
CN103531176B true CN103531176B (en) 2016-08-17

Family

ID=49933134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310171292.0A Expired - Fee Related CN103531176B (en) 2013-05-10 2013-05-10 A kind of font display optimization method and system of Android terminal

Country Status (1)

Country Link
CN (1) CN103531176B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106383689A (en) * 2016-09-20 2017-02-08 青岛海信电器股份有限公司 Display font size adjustment method and apparatus, and terminal device

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105100865B (en) * 2014-05-12 2018-04-13 深圳Tcl新技术有限公司 The control method and device of multi-channel image processor
TWI567568B (en) * 2016-03-22 2017-01-21 文鼎科技開發股份有限公司 Character adjustment method
CN107393494A (en) * 2017-08-17 2017-11-24 福建星网锐捷通讯股份有限公司 A kind of font dot matrix display methods and storage device based on LCDs
CN108630301B (en) * 2018-04-16 2021-07-02 北京市神经外科研究所 Feature marking method and device and computer storage medium
CN112752164B (en) * 2019-10-30 2023-02-17 深圳Tcl数字技术有限公司 Closed caption display method, intelligent terminal and storage medium
CN111260743A (en) * 2020-01-08 2020-06-09 北大方正集团有限公司 Method and device for adjusting character strokes
CN111372124B (en) * 2020-03-09 2022-04-15 格兰菲智能科技有限公司 Character and image coding and decoding method
CN112836467B (en) * 2020-12-30 2023-12-12 腾讯科技(深圳)有限公司 Image processing method and device
CN112925596B (en) * 2021-02-25 2022-11-15 青岛海信移动通信技术股份有限公司 Mobile terminal and display method of display object thereof
CN113407135A (en) * 2021-06-23 2021-09-17 青岛海信移动通信技术股份有限公司 Display control method applied to ink screen and related device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07210136A (en) * 1994-01-20 1995-08-11 Hitachi Ltd Gradation character generation system
EP0693740A1 (en) * 1994-07-19 1996-01-24 Microsoft Corporation Method of font rendering employing greyscale processing of grid-fitted fonts
TW200419527A (en) * 2002-08-22 2004-10-01 Seiko Epson Corp Image display device, image display method and image display program
CN101127207A (en) * 2007-09-26 2008-02-20 北大方正集团有限公司 Method and device for promoting grey scale font display quality

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100369049C (en) * 2005-02-18 2008-02-13 富士通株式会社 Precise dividing device and method for grayscale character

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07210136A (en) * 1994-01-20 1995-08-11 Hitachi Ltd Gradation character generation system
EP0693740A1 (en) * 1994-07-19 1996-01-24 Microsoft Corporation Method of font rendering employing greyscale processing of grid-fitted fonts
TW200419527A (en) * 2002-08-22 2004-10-01 Seiko Epson Corp Image display device, image display method and image display program
CN101127207A (en) * 2007-09-26 2008-02-20 北大方正集团有限公司 Method and device for promoting grey scale font display quality

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106383689A (en) * 2016-09-20 2017-02-08 青岛海信电器股份有限公司 Display font size adjustment method and apparatus, and terminal device
CN106383689B (en) * 2016-09-20 2019-11-29 青岛海信电器股份有限公司 Display font scale adjusting method, device and terminal device

Also Published As

Publication number Publication date
CN103531176A (en) 2014-01-22

Similar Documents

Publication Publication Date Title
CN103531176B (en) A kind of font display optimization method and system of Android terminal
CN109379625B (en) Video processing method, video processing device, electronic equipment and computer readable medium
Shi et al. Normalised gamma transformation‐based contrast‐limited adaptive histogram equalisation with colour correction for sand–dust image enhancement
CN109242802B (en) Image processing method, image processing device, electronic equipment and computer readable medium
US10798334B2 (en) Image processing system, image display method, display device and storage medium
US9001274B2 (en) Image processing method
KR102550846B1 (en) Method of performing an image-adaptive tone mapping and display device employing the same
CN102402918B (en) Method for improving picture quality and liquid crystal display (LCD)
US11074849B2 (en) Display method, display device, and display
KR20010020997A (en) Techniques for displaying complex characters
US9449585B2 (en) Systems and methods for compositing a display image from display planes using enhanced blending hardware
CN101290742B (en) Image output apparatus and image display apparatus
WO2019153731A1 (en) Image processing method and system
CN105825489A (en) Infrared image enhancement method based on combination of gray translation and linear stretching
CN1937779A (en) Method for improving television terminal device digital caption data processing efficiency
CN110807750B (en) Image processing method and apparatus
US20130084004A1 (en) Image processing of data from scanned display
CN114035763B (en) Jitter optimization method and device of electronic ink screen as computer display
CN116825039A (en) Backlight brightness calculating method, display device and computer readable storage medium
CN115209145A (en) Video compression method, system, device and readable storage medium
US7375770B2 (en) Method for luminance transition improvement
CN104268098A (en) On-chip cache system for transformation on ultrahigh-definition video frame rates
US6919902B2 (en) Method and apparatus for fetching pixel data from memory
US8705134B2 (en) Method of processing an image to clarify text in the image
CN115439660A (en) Detection method, detection device, electronic equipment and medium

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160817