| CPC G06F 40/109 (2020.01) [G06T 11/001 (2013.01)] | 17 Claims |

|
1. A character display method, performed by an electronic device having a screen, comprising:
obtaining a to-be-displayed character to be displayed on the screen;
determining a type of the to-be-displayed character;
determining a display origin of the to-be-displayed character on the screen based on the type of the to-be-displayed character;
displaying, at the display origin of the to-be-displayed character on the screen, the to-be-displayed character in a first manner in response to the to-be-displayed character being of a first type; and
displaying, at the display origin of the to-be-displayed character on the screen, the to-be-displayed character in a second manner in response to the to-be-displayed character being of a second type,
wherein said determining the display origin of the to-be-displayed character on the screen based on the type of the to-be-displayed character comprises:
obtaining a position of an initial display origin, wherein the position of the initial display origin is a display position of a first to-be-displayed character on the screen; and
determining a position of the display origin of the to-be-displayed character based on the position of the initial display origin and a display parameter,
wherein said determining the position of the display origin of the to-be-displayed character based on the position of the initial display origin and the display parameter comprises:
determining the display origin of the to-be-displayed character based on a type of a previous character, a display origin of the previous character, the display parameter, and the type of the to-be-displayed character,
wherein:
the display parameter comprises an outline width of a character, a character spacing, and an outline height of the character; and
said determining the display origin of the to-be-displayed character based on the type of the previous character, the display origin of the previous character, the display parameter, and the type of the to-be-displayed character comprises:
calculating, in response to the previous character and the to-be-displayed character being of the first type, coordinates of the display origin of the to-be-displayed character based on coordinates of the display origin of the previous character, an outline height of the to-be-displayed character, and the character spacing;
calculating, in response to the previous character being of the second type and the to-be-displayed character being of the first type, the coordinates of the display origin of the to-be-displayed character based on the coordinates of the display origin of the previous character, an outline width of the previous character, the outline height of the to-be-displayed character, and the character spacing;
calculating, in response to the previous character being of the first type and the to-be-displayed character being of the second type, the coordinates of the display origin of the to-be-displayed character based on the coordinates of the display origin of the previous character and the character spacing; and
calculating, in response to the previous character and the to-be-displayed character being of the second type, the coordinates of the display origin of the to-be-displayed character based on the coordinates of the display origin of the previous character, the outline width of the previous character, and the character spacing.
|