Character string display processing method and apparatus, terminal, and storage medium
US-2022021949-A1 · Jan 20, 2022 · US
US12079575B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-12079575-B2 |
| Application number | US-202118245056-A |
| Country | US |
| Kind code | B2 |
| Filing date | Aug 10, 2021 |
| Priority date | Oct 23, 2020 |
| Publication date | Sep 3, 2024 |
| Grant date | Sep 3, 2024 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
Provided are a character display method and apparatus, an electronic device, and a computer-readable storage medium. The character display method includes: receiving a display parameter; obtaining a to-be-displayed character; obtaining a texture of the to-be-displayed character; and displaying the texture of the to-be-displayed character on a screen based on the display parameter and an attribute of the texture of the to-be-displayed character. According to the method, the display parameter is received, and the texture of the to-be-displayed character is drawn based on the display parameter, which can solve the problem of inflexible controlling on the drawing of the character.
Opening claim text (preview).
What is claimed is: 1. A character display method, comprising: receiving a display parameter; obtaining a to-be-displayed character; obtaining a texture of the to-be-displayed character; and displaying the texture of the to-be-displayed character on a screen based on the display parameter and an attribute of the texture of the to-be-displayed character, wherein said displaying the texture of the to-be-displayed character on the screen based on the display parameter and the attribute of the texture of the to-be-displayed character comprises: determining, based on the display parameter and the attribute of the texture of the to-be-displayed character, whether the texture of the to-be-displayed character is to be displayed in a wrapping manner; determining a display position of the texture of the to-be-displayed character on the screen, based on the display parameter that corresponds to the determination and the attribute of the texture of the to-be-displayed character; and displaying the texture of the to-be-displayed character on the screen based on the display position. 2. The character display method according to claim 1 , wherein said obtaining the to-be-displayed character comprises: obtaining a to-be-displayed text; and obtaining at least one to-be-displayed character by separating characters in the to-be-displayed text. 3. The character display method according to claim 1 , wherein said obtaining the texture of the to-be-displayed character comprises: obtaining a character texture atlas; and obtaining the texture of the to-be-displayed character from the character texture atlas. 4. The character display method according to claim 3 , further comprising obtaining a character mapping relationship table, wherein said obtaining the texture of the to-be-displayed character from the character texture atlas comprises: looking up the character mapping relationship table for a position of the texture of the to-be-displayed character in the character texture atlas; and obtaining the texture of the to-be-displayed character from the character texture atlas based on the position, wherein the character mapping relationship table comprises a mapping relationship between a character and a position of a texture of the character in the character texture atlas. 5. The character display method according to claim 4 , wherein the character texture atlas is generated by: obtaining a single character; generating, in response to absence of the single character in the character texture atlas, a texture of the single character based on a font attribute of the single character; and drawing the texture of the single character in the character texture atlas. 6. The character display method according to claim 5 , further comprising: obtaining a texture position of the texture of the single character in the character texture atlas; determining a mapping relationship between the single character and the texture position; and updating the character mapping relationship table based on the mapping relationship between the single character and the texture position. 7. The character display method according to claim 1 , wherein: the display parameter comprises a line width; and said determining, based on the display parameter and the attribute of the texture of the to-be-displayed character, whether the texture of the to-be-displayed character is to be displayed in the wrapping manner comprises: calculating a width of a to-be-displayed character line, based on the attribute of the texture of the to-be-displayed character and an attribute of a texture of a character preceding the to-be-displayed character; comparing the width of the to-be-displayed character line with the line width; and determining, based on the comparing the width of the to-be-displayed character line with the line width, whether the texture of the to-be-displayed character is to be displayed in the wrapping manner. 8. The character display method according to claim 7 , wherein said determining, based on the comparing with the width of the to-be-displayed character line with the line width, whether the texture of the to-be-displayed character is to be displayed in the wrapping manner comprises: determining, when the width of the to-be-displayed character line is smaller than or equal to the line width, that the texture of the to-be-displayed character is to be displayed in an unwrapping manner; and determining, when the width of the to-be-displayed character line is greater than the line width, that the texture of the to-be-displayed character is to be displayed in the wrapping manner. 9. The character display method according to claim 7 , wherein said calculating the width of the to-be-displayed character line based on the attribute of the texture of the to-be-displayed character and the attribute of the texture of the character preceding the to-be-displayed character comprises: calculating a first distance from a first border of the texture of the to-be-displayed character to a texture origin of the to-be-displayed character, wherein the texture origin is an origin of the texture of the to-be-displayed character in a character texture atlas; calculating an origin of the texture of the to-be-displayed character on the screen based on an origin of the texture of the character preceding the to-be-displayed character on the screen, a size of the character, and a character spacing; and calculating a first position based on the origin of the texture of the to-be-displayed character on the screen and the first distance, wherein the first position comprises a position of the first border of the texture of the to-be-displayed character on the screen, and the first position represents the width of the to-be-displayed character line. 10. The character display method according to claim 9 , wherein said comparing the width of the to-be-displayed character line with the line width comprises: calculating a position of a first boundary of the to-be-displayed character line based on an origin of a texture of a first character of the to-be-displayed character line on the screen and the line width; determining, when the first position exceeds the position of the first boundary, that the width of the to-be-displayed character line is greater than the line width; and determining, when the first position does not exceed the position of the first boundary, that the width of the to-be-displayed character line is smaller than or equal to the line width. 11. The character display method according to claim 1 , wherein: the display parameter comprises a character spacing, an initial origin position, and a line spacing; and said determining the display position of the texture of the to-be-displayed character on the screen based on the display parameter that corresponds to the determination and the attribute of the texture of the to-be-displayed character comprises: determining, in response to determining that the texture of the to-be-displayed character is to be displayed in an unwrapping manner, the display position of the texture of the to-be-displayed character on the screen based on a display position of a previous character to the to-be-displayed character, the character spacing, and the attribute of the texture of the to-be-displayed character; and determining, in response to determining that the texture of the to-be-displayed character is to be displayed in the wrapping manner, the display position of the texture of the to-be-displayed character on the screen based on the display position of the previous character to the to-be-displayed character, the initial origin position, the line spacing, and the attribute of the texture o
Texturing; Colouring; Generation of textures or colours (retouching, inpainting or scratch removal G06T5/77) · CPC title
Energy efficient computing, e.g. low power processors, power management or thermal management · CPC title
Font handling; Temporal or kinetic typography · CPC title
Creating or editing images; Combining images with text · CPC title
Recognition of textual entities · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.