Character display method, character display device and terminal equipment

文档序号:449829 发布日期:2021-12-28 浏览:3次 中文

阅读说明:本技术 字符显示方法、字符显示装置及终端设备 (Character display method, character display device and terminal equipment ) 是由 谢鲁冰 罗义 于 2020-06-28 设计创作,主要内容包括:本申请提供一种字符显示方法、字符显示装置及终端设备,涉及终端技术领域。该方法包括:在终端设备以第一字体显示字符的过程中,若目标字符不能以第一字体显示,则终端设备从第二字体包中获取目标字符的第二轮廓信息,第二轮廓信息用于以第二字体显示目标字符;终端设备根据第二轮廓信息,识别目标字符中的每个字符单元,以及每个字符单元在目标字符中的位置信息;终端设备根据每个字符单元与第一字体对应的子轮廓信息,和该位置信息,以第一字体显示目标字符。采用本申请提供的字符显示方法,终端设备可以在一定程度上避免字体显示异常。(The application provides a character display method, a character display device and terminal equipment, and relates to the technical field of terminals. The method comprises the following steps: in the process that the terminal equipment displays the characters in the first font, if the target characters cannot be displayed in the first font, the terminal equipment acquires second outline information of the target characters from a second font packet, wherein the second outline information is used for displaying the target characters in the second font; the terminal equipment identifies each character unit in the target character and the position information of each character unit in the target character according to the second contour information; and the terminal equipment displays the target character in the first font according to the sub-outline information corresponding to the first font of each character unit and the position information. By adopting the character display method provided by the application, the terminal equipment can avoid abnormal font display to a certain extent.)

1. A character display method is applied to terminal equipment, and is characterized by comprising the following steps:

in the process of displaying characters in a first font, if a target character cannot be displayed in the first font, acquiring second outline information of the target character from a second font packet, wherein the second outline information is used for displaying the target character in the second font;

identifying each character unit in the target character and position information of each character unit in the target character according to the second outline information;

and displaying the target character in the first font according to the sub-outline information corresponding to the first font of each character unit and the position information.

2. The method according to claim 1, wherein displaying the target character in the first font based on the sub-outline information corresponding to the first font per character unit and the position information comprises:

determining first contour information of the target character according to the sub-contour information and the position information;

and displaying the target character in the first font according to the first outline information.

3. The method of claim 2, further comprising storing the first outline information in a first font packet corresponding to the first font.

4. The method according to claim 1, wherein displaying the target character in the first font based on the sub-outline information corresponding to the first font per character unit and the position information comprises:

determining a display area of the target character in a display interface;

determining the display position of each character unit in the target character in the display area according to the position information;

and displaying each character unit in the first font according to the sub-outline information at the corresponding display position so as to display the target character.

5. The method according to any one of claims 1 to 4, wherein the sub-outline information is determined according to a plurality of basic feature characters in a first font packet corresponding to the first font, and the plurality of basic feature characters comprise each character unit in the target character.

6. The method of claim 5, further comprising:

obtaining third profile information of the plurality of basic characteristic characters from the first font packet, wherein the third profile information is used for displaying the plurality of basic characteristic characters in the first font;

and determining the sub-contour information according to the third contour information.

7. A character display device applied to a terminal device, the character display device comprising:

an information obtaining unit configured to obtain, from a second font packet, second outline information of a target character if the target character cannot be displayed in a first font during display of the character in the first font, the second outline information being used for displaying the target character in a second font;

the identification unit is used for identifying each character unit in the target character and the position information of each character unit in the target character according to the second contour information;

and the display control unit is used for displaying the target character in the first font according to the sub-outline information corresponding to the first font of each character unit and the position information.

8. A terminal device comprising a display unit, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that, when the computer program product is run on a terminal device, it causes the terminal device to execute the character display method according to any one of claims 1 to 6.

Technical Field

The present application relates to the field of terminal technologies, and in particular, to a character display method, a character display apparatus, and a terminal device.

Background

The operating system of the terminal device is usually provided with a system font packet, such as a black body font packet, a regular body font packet, a song body font packet and the like. In addition, the terminal device may also install a theme font packet according to the user instruction, such as a circle font packet, a chinese character running regular font packet, a huakang doll font packet, and the like.

Currently, the system font packet includes almost all Chinese characters, but the theme font packet is usually made according to the GB2312 standard, and only 6763 common Chinese characters are included in the theme font packet. Therefore, when the terminal device displays the Chinese characters by using the theme font, when the Chinese characters to be displayed are uncommon characters which are not contained in the theme font packet, the terminal device cannot display the uncommon characters, or can only display the uncommon characters according to the system font, so that the font display is abnormal.

Disclosure of Invention

The application provides a character display method, a character display device and a terminal device, which can solve the problem of abnormal font display of the terminal device to a certain extent.

In order to achieve the purpose, the technical scheme is as follows:

in a first aspect, an embodiment of the present application provides a character display method, which is applied to a terminal device, and the method includes:

in the process of displaying characters in a first font, if a target character cannot be displayed in the first font, acquiring second outline information of the target character from a second font packet, wherein the second outline information is used for displaying the target character in the second font;

identifying each character unit in the target character and position information of each character unit in the target character according to the second outline information;

and displaying the target character in the first font according to the sub-outline information corresponding to the first font of each character unit and the position information.

By adopting the character display method provided by the embodiment, when the terminal device encounters a character which cannot be displayed in the first font, each character unit included in the character and the position information of each character unit in the character can be identified according to the existing second outline information of the character. And according to the preset sub-outline information corresponding to each character unit and the first font and the position information, the character is intelligently displayed by the first font, the problem of abnormal font display of the terminal equipment is avoided to a certain extent, and the text reading experience of a user is improved.

In some embodiments of the first aspect, displaying the target character in the first font according to the sub-outline information corresponding to the first font per character unit and the position information comprises:

determining first contour information of the target character according to the sub-contour information and the position information;

and displaying the target character in the first font according to the first outline information.

In some embodiments of the first aspect, the character display method further includes storing the first outline information in a first font packet corresponding to the first font.

It can be understood that when the terminal device encounters the target character again, the first outline information of the target character can be directly called from the first font packet, which is beneficial to improving the display efficiency of the terminal device.

In some embodiments of the first aspect, displaying the target character in the first font according to the sub-outline information corresponding to the first font per character unit and the position information comprises:

determining a display area of the target character in a display interface;

determining the display position of each character unit in the target character in the display area according to the position information;

and displaying each character unit in the first font according to the sub-outline information at the corresponding display position so as to display the target character.

It can be understood that the process of generating outline information is avoided and the target character is displayed quickly by displaying each character unit included in the character in the first font directly in the display area of the character, thereby displaying the target character.

In some embodiments of the first aspect, the sub-outline information is determined from a plurality of basic feature characters in a first font packet corresponding to the first font, the plurality of basic feature characters including each character unit in the target character.

In some embodiments of the first aspect, the method further comprises:

obtaining third profile information of the plurality of basic characteristic characters from the first font packet, wherein the third profile information is used for displaying the plurality of basic characteristic characters in the first font;

and determining the sub-contour information according to the third contour information.

In a second aspect, the present embodiment provides a character display apparatus, applied to a terminal device, the character display apparatus including:

an information obtaining unit configured to obtain, from a second font packet, second outline information of a target character if the target character cannot be displayed in a first font during display of the character in the first font, the second outline information being used for displaying the target character in a second font;

the identification unit is used for identifying each character unit in the target character and the position information of each character unit in the target character according to the second contour information;

and the display control unit is used for displaying the target character in the first font according to the sub-outline information corresponding to the first font of each character unit and the position information.

In a third aspect, the present embodiment provides a terminal device, which includes a display unit, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the character display method according to the first aspect when executing the computer program.

In a fourth aspect, the present embodiment provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the character display method of the first aspect.

In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute the character display method according to the first aspect.

In a sixth aspect, an embodiment of the present application provides a chip system, where the chip system includes a processor, the processor is coupled with a memory, and the processor executes a computer program stored in the memory to implement the character display method according to the first aspect. In this embodiment, the chip system may be a single chip or a chip module formed by a plurality of chips.

It is understood that the beneficial effects of the second to sixth aspects can be seen from the description of the first aspect, and are not described herein again.

Drawings

Fig. 1 is a schematic structural diagram of a mobile phone to which a character display method according to an embodiment of the present application is applied;

fig. 2 is a schematic diagram of a software architecture to which a character display method according to an embodiment of the present application is applied;

FIG. 3 shows a character according to the present embodimentA schematic of the profile information of (a);

fig. 4 is a first schematic view of a display interface provided in this embodiment;

fig. 5 is a schematic view of a display interface provided in this embodiment;

fig. 6 is a schematic diagram of a display interface provided in this embodiment;

fig. 7 is a fourth schematic view of a display interface provided in the present embodiment;

FIG. 8 is a flowchart of a character display method according to an embodiment of the present disclosure;

FIG. 9 is a schematic diagram illustrating a location of a character unit according to an embodiment of the present disclosure;

FIG. 10a is a first schematic diagram illustrating a display principle of a character according to an embodiment of the present disclosure;

FIG. 10b is a second schematic diagram illustrating a display principle of a character according to an embodiment of the present disclosure;

FIG. 10c is a third schematic diagram illustrating a display principle of a character according to an embodiment of the present disclosure;

FIG. 11 is a schematic diagram of a display interface provided in an embodiment of the present application;

FIG. 12 is a flowchart of a method for determining a first set of character units according to an embodiment of the present application;

FIG. 13 is a flowchart of a method for determining a second set of character units according to an embodiment of the present application;

fig. 14 is a block diagram schematically illustrating a structure of a character display device according to an embodiment of the present application.

Detailed Description

The character display method provided by the embodiment of the application can be applied to terminal equipment capable of displaying text information, such as mobile phones, tablet computers, electronic readers, notebook computers, netbooks, wearable equipment and the like, and the specific type of the terminal equipment is not limited at all.

It should be understood that the reference to first, second, third and various numerical references in this application are only for descriptive convenience and are not intended to limit the scope of the application.

Take the terminal device as a mobile phone as an example. Fig. 1 is a block diagram illustrating a partial structure of a mobile phone according to an embodiment of the present disclosure. Referring to fig. 1, the mobile phone includes Radio Frequency (RF) circuit 110, memory 120, input unit 130, display unit 140, sensor 150, audio circuit 160, wireless fidelity (WiFi) module 170, processor 180, and power supply 190. Those skilled in the art will appreciate that the handset configuration shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.

The following describes each component of the mobile phone in detail with reference to fig. 1:

the RF circuit 110 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information of a base station and then processes the received downlink information to the processor 180; in addition, the data for designing uplink is transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 110 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), e-mail, Short Messaging Service (SMS), and the like.

The memory 120 may be used to store text information, software programs and modules, and the processor 180 executes various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a character display function) required for at least one function, and the like; the storage data area may store data (such as text information) created according to the use of the cellular phone, and the like. Further, the memory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.

The input unit 130 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 130 may include a touch panel 131 and other input devices 132. The touch panel 131, also referred to as a touch screen, may collect touch operations of a user on or near the touch panel 131 (e.g., operations of the user on or near the touch panel 131 using any suitable object or accessory such as a finger or a stylus pen), and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 131 may include two parts, i.e., a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 180, and can receive and execute commands sent by the processor 180. In addition, the touch panel 131 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 130 may include other input devices 132 in addition to the touch panel 131. Other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

The display unit 140 may be used to display information input by a user or information provided to the user and various menus of the mobile phone. The Display unit 140 may include a Display panel 141, and optionally, the Display panel 141 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 131 can cover the display panel 141, and when the touch panel 131 detects a touch operation on or near the touch panel 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although the touch panel 131 and the display panel 141 are shown as two separate components in fig. 1 to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 131 and the display panel 141 may be integrated to implement the input and output functions of the mobile phone.

The handset may also include at least one sensor 150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 141 and/or the backlight when the mobile phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.

Audio circuitry 160, speaker 161, and microphone 162 may provide an audio interface between the user and the handset. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data, which is then processed by the audio data output processor 180 and then transmitted to, for example, another cellular phone via the RF circuit 110, or the audio data is output to the memory 120 for further processing.

WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 170, and provides wireless broadband Internet access for the user. Although fig. 1 shows the WiFi module 170, it is understood that it does not belong to the essential constitution of the handset, and may be omitted entirely as needed within the scope not changing the essence of the invention.

The processor 180 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby integrally monitoring the mobile phone. Alternatively, processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.

The processing unit in the processor 180 includes: a Text control unit (Text View)1801, a Text rendering unit (DrawText)1802, and a graphics rendering engine 1803. The text control unit 1801 is configured to determine display information such as content, font size, and display shape of a text. A text drawing unit 1802 controls a layout style of the text. And a graphics rendering engine (Skia)1803, configured to finally determine a display image of the text in the display interface according to the display information and the layout style of the text.

The handset also includes a power supply 190 (such as a battery) to power the various components. Preferably, the power source may be logically connected to the processor 180 through a power management system, so that the power management system may manage charging, discharging, and power consumption.

Although not shown, the handset may also include a camera. Optionally, the position of the camera on the mobile phone may be front-located or rear-located, which is not limited in this embodiment of the present application.

Optionally, the mobile phone may include a single camera, a dual camera, or a triple camera, which is not limited in this embodiment. For example, a cell phone may include three cameras, one being a main camera, one being a wide camera, and one being a tele camera. When the mobile phone includes a plurality of cameras, the plurality of cameras may be all disposed in front, or all disposed in back, or a part of the cameras may be disposed in front, and another part of the cameras may be disposed in back, which is not limited in this application.

In addition, although not shown, the mobile phone may further include a bluetooth module, etc., which will not be described herein.

Fig. 2 is a schematic diagram of a software structure of a mobile phone according to an embodiment of the present application. Taking a mobile phone operating system as an Android system as an example, in some embodiments, the Android system is divided into four layers, which are an application layer, an application Framework (FWK) layer, a system layer and a hardware abstraction layer, and the layers communicate with each other through a software interface.

As shown in fig. 2, the application layer may be a series of application packages, which may include short message, calendar, camera, video, navigation, gallery, call, etc. applications.

The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer may include some predefined functions, such as functions for receiving events sent by the application framework layer.

As shown in FIG. 2, the application framework layers may include a window manager, a resource manager, and a notification manager, among others.

The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like. The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.

The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.

The application framework layer may further include:

a viewing system that includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.

The telephone manager is used for providing the communication function of the mobile phone. Such as management of call status (including on, off, etc.).

The system layer may include a plurality of functional modules. For example: a sensor service module, a physical state identification module, a three-dimensional graphics processing library (such as OpenGL ES), and the like.

The sensor service module is used for monitoring sensor data uploaded by various sensors in a hardware layer and determining the physical state of the mobile phone;

the physical state recognition module is used for analyzing and recognizing user gestures, human faces and the like;

the three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.

The system layer may further include:

the surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.

The hardware abstraction layer is a layer between hardware and software. The hardware abstraction layer may include a display driver, a camera driver, a sensor driver, etc. for driving the relevant hardware of the hardware layer, such as a display screen, a camera, a sensor, etc.

The following embodiments may be implemented on a mobile phone having the above-described hardware structure/software structure. The following embodiments will describe the character display method provided in the embodiments of the present application, taking a mobile phone as an example.

The terminal device (for example, a mobile phone) provided by the embodiment can store and display text information. Wherein the text information is typically composed of a plurality of characters. For example, characters may include letters (e.g., "X", "Y", "Z"), numbers (e.g., "1", "2", "3"), kanji (e.g., "today", "day", "etc.), and symbols (e.g.," # "," | "), etc., to represent a particular meaning.

It should be noted that, when the terminal device stores the text information, the terminal device does not directly store each character in the text information, but stores a unique universal identifier, such as a Unicode (Unicode), corresponding to each character in the text information according to the arrangement sequence of each character in the text information. The unique universal identification is used to uniquely indicate the corresponding character. Illustratively, when the terminal device stores the text information "today is sunny and there is no clouds in the universe", it actually stores its corresponding Unicode "4 ECA 592959296C 1466746717002C 4E 0791 CC 65E 04E 91".

When the terminal device displays the text information, the unique universal identification corresponding to the text information needs to be converted into a corresponding character according to a preset rule for display, so that a user can intuitively understand the character.

In order to convert the unique universal identifier into characters for display, a font packet is usually provided in the terminal device. Font packets typically contain outline information for some characters in one or more languages. For example, the font packet of the GB2312 standard generally includes 6763 specific chinese characters and some outline information of common non-chinese character symbols. The outline information determines the display shape and the display position of the outline of each component in the character, and the terminal equipment can display the character according to the outline information. Illustratively, for the character identified as "# 369 b" uniquely and universallyThe profile information can be as shown in fig. 3.

Characters can generally be displayed in a variety of different fonts, each font corresponding to a font packet, e.g., a font corresponding to an a font packet, B font corresponding to a B font packet, etc. It can be understood that the same character is in different font packets, the corresponding outline information is different, and based on the different outline information, the terminal device can display the same character as different fonts. For example, for the character "now," the terminal device may display "now" in the font a using the outline information of "now" in the font a package, and display "now" in the font B using the outline information of "now" in the font B package.

In addition, it should be noted that each character is provided with a unique universal identification. In a font packet, the unique universal identification of each character corresponds to the outline information of the character. For example, if 4ECA is Unicode of "now", and 4ECA corresponds to the outline information of "now" in the font packet, the terminal device may call the outline information of "now" from the font packet through 4 ECA. 5929 is Unicode of "day", in the font packet, 5929 corresponds to the outline information of "day", and the terminal device can call the outline information of "day" from the font packet through 5929. In different font packets, a unique universal identification corresponds to different outline information of a character. For example, for Unicode 4ECA for the character "today," in the A font packet, 4ECA corresponds to outline information for the "today" A font, and in the B font packet, 4ECA corresponds to outline information for the "today" B font.

And in the process of displaying the stored text information, the terminal equipment calls the corresponding outline information from the font packet to display each character according to the unique universal identification.

Taking the text information of "today is sunny and there is no cloud in all miles" as an example, according to the difference of font packages applied by the terminal device, the text information can be displayed on the display interface in different fonts according to the corresponding unique universal identifier "4 ECA 592959296C 1466746717002C 4E 0791 CC 65E 04E 91".

In some embodiments, referring to table 1, table 1 is a correspondence table of the characters, Unicode, and outline information of the D font of the characters. With reference to table 1, in the process of displaying the characters corresponding to Unicode "4 ECA 592959296C 1466746717002C 4E 0791 CC 65E 04E 91", the terminal device acquires the outline information of the D font corresponding to the corresponding characters "present", "day", "qi", "sunny", "long", "", "ten", "few", and "cloud" from the D font packet based on the Unicode, and displays the characters in the order corresponding to the Unicode based on the outline information. Illustratively, the display results of these characters may be as shown in fig. 4.

Table 1 corresponding relation table one

Character(s) Unicode Outline information of D font
Jinjin tea 4ECA Contour information of "today
Sky 5929 Outline information of "sky
Qi (Qi) 6C14 Contour information of "gas
All-weather 6674 Outline information of' fine
Lang-lang wine 6717 'Lang' profile information
All the details of 4E07 "Wan" contour information
Lining (Chinese character of 'li') 91CC 'inner' outline information
Is free of 65E0 "none" contour information
Cloud 4E91 Outline information of "cloud
002C "," profile information

In some other embodiments, when the font packet currently applied by the terminal device is an E font packet, the terminal device displays the text information in an E font, for example, as shown in fig. 5.

The font packet has different national standards, such as GB2312, GB18030-2000, GB18030-2005, etc. GB2312 specifies that the font packet contains 6763 specific chinese characters and some common non-chinese symbols. GB18030-2000 specifies that the font packet contains 27533 specific chinese characters, and some common non-chinese symbols, adding some less common chinese characters compared to GB 2312. GB18030-2005 stipulates that the font packet contains 70244 chinese characters (including a large number of uncommon words), and some common non-chinese symbols. It can be understood that, when the number of characters included in the font packet is more, the production cost of the font packet is higher, and the memory occupied by the font packet is larger.

Currently, a terminal device is usually provided with a system font packet, and outline information of almost all the characters is included in the system font packet. Illustratively, the system font package may be an a font package, a B font package, a C font package, etc., for displaying characters in an a font, a B font, and a C font, respectively. Illustratively, when the terminal device specifies the a font as the display font of the character, the terminal device calls outline information of the character from the a font packet, and displays the corresponding character in the a font.

In addition, a font package (hereinafter, referred to as a theme font package for convenience of distinguishing from the system font package) having a certain font style, which is installed according to a user instruction, such as a D font package, an E font package, an F font package, and the like, may also be provided in the terminal device, and is used for displaying characters in a theme font such as a D font, an E font, an F font, and the like, respectively. It should be noted that the theme font corresponding to the theme font packet is different from the system font. In order to save cost and reduce the occupation of the theme font packet on the memory of the terminal device, the theme font packet is usually made according to the GB2312 standard, which only contains 6763 commonly used chinese characters and some commonly used non-chinese character symbols.

Therefore, when the terminal device displays the characters in the theme font currently, if the target character is some characters not included in the theme font packet, for example, a uncommon word, the terminal device cannot display the uncommon word, or the uncommon word is displayed according to the system font, which results in abnormal font display.

For example, the following describes the display cases of the characters "true", "yes", and "" by taking as an example that the theme font package currently applied by the terminal device is an F font package and the system font package is an a font package.

"true" and "yes" are common Chinese characters included in the F font packet, and therefore, when displaying "true" and "yes", the terminal device can call outline information of "true" and "yes" from the F font packet according to the unique common identifiers "771F" and "662F" of "true" and "yes", and display "true" and "yes" in the F font according to the outline information, specifically refer to fig. 6 or fig. 7.

"" is a uncommon word not included in the F font packet, i.e., the outline information of "" is not included in the F font packet. Therefore, when the terminal device displays the character "", the outline information of "" cannot be found in the F font packet according to the unique universal identifier "8621". Therefore, the terminal device cannot display the character "" word in the F font.

For the character "" that cannot be displayed in the F font, the terminal device may display it in scrambling code, for example, as shown in fig. 6, as a box with an "x" symbol, resulting in an abnormal font display. Alternatively, the terminal device may call the outline information of "" from the system font packet according to its unique universal identifier "8621" and display the "" word according to the system font (e.g., font a), as shown in fig. 7. But this will cause the same display interface to appear with two different fonts, i.e., a font and F font, which will also cause font display anomalies.

Therefore, the application provides a character display method which is applied to a terminal device to solve the problem that abnormal font display occurs when the terminal device displays characters in a first font (such as a theme font).

It should be noted that the terminal device is installed with a first font packet and a second font packet, and is provided with a first character unit set corresponding to the first font packet and a second character unit set corresponding to the second font packet. And the terminal device is currently set to display the characters in the first font. The first font packet comprises contour information of the first font character, and the second font packet comprises contour information of the second font character. Illustratively, the first font package may be a user-installed theme font package. The second font packet may be a system font packet installed on the terminal device, or another non-system font packet different from the first font packet, which is not limited in this embodiment.

The first set of character units includes sub-outline information of character units of the first font, for example, as shown in table 2. The second set of character units includes sub-outline information for the character units of the second font, for example, as shown in table 3. Exemplary, such character units include, but are not limited to: "" + "," "", "female", "one", "I", "B", "vacuum control unit", "Contraband", "alpha", "day", "first", "cun", "earth", "day", "bird", "square", "wind", "father", "king", "fire", "Wei", "worm", "and then", "mail", "", "Jiong", etc. constitute the character unit commonly used for the character.

TABLE 2 first character Unit set

TABLE 3 second character Unit set

It should be noted that each character unit is provided with an identification information for uniquely indicating the character unit. And in different character unit sets, the same identification information corresponds to the sub-outline information of different fonts of the same character unit. For example, "1" is "-", in the first character unit set, "1" corresponds to the sub-outline information of the "-" first font; but in the second character unit set, "1" corresponds to "-" second font sub-outline information.

Fig. 8 is a flowchart of a character display method according to an embodiment of the present application. Referring to fig. 8, the character display method includes the following steps S801 to S803.

S801, in the process that the terminal device displays the character in the first font, if the target character cannot be displayed in the first font, obtaining second outline information of the target character from a second font packet, wherein the second outline information is used for displaying the target character in the second font.

And the terminal equipment calls first contour information corresponding to the target character in the first font packet in the process of displaying the target character in the first font, and displays the target character according to the first contour information. However, when the first outline information is not included in the first font packet, the first terminal cannot display the character in the first font according to the related art. At this time, the second outline information of the character may be called from the second font packet.

Illustratively, in the process of displaying the character "true " in the F font, the terminal device may not find the first outline information of "" in the F font packet according to the unique universal identifier "8621" of the uncommon word "", so that the first terminal may not display the character in the first font. At this time, the terminal device calls the second outline information of "" from the second font packet (e.g., the a font packet of the system) according to the unique common identifier "8621".

S802, the terminal equipment identifies each character unit in the target character and the position information of each character unit in the target character according to the second outline information.

The second outline information includes sub-outline information of each character unit of the corresponding character and position information of each character unit in the character. The terminal device may identify each character unit in the target character and position information of each character unit in the target character according to the second outline information, which is described in detail below.

A character is generally composed of one or more strokes, and in this embodiment, the portion connected by the strokes is referred to as a minimum unit. For example, the parts connected by the strokes of the character "light" are "day" and "month", and therefore the minimum units thereof are "day" and "month".

The character has N minimum units corresponding to the character, and the outline information of the character comprises sub-outline information of the N minimum units, wherein N is more than or equal to 1, and N is an integer. Since one sub-outline information is used to describe the outline of a minimum cell, these sub-outline information are independent of each other when used to display the small cell. And the terminal equipment can determine the position of the outer contour of the minimum unit in the character display area according to the sub-contour information of the minimum unit, and the minimum unit can be displayed by filling the outer contour. By displaying all the smallest units of a character, the character can be displayed.

Therefore, in this embodiment, when the terminal device identifies the target character, the terminal device may split the second outline information of the target character by using the sub-outline information of the minimum unit as a splitting unit, and determine the character unit according to the split outline information.

Next, step S802 will be described using a character "" as an example.

First, the terminal device recognizes sub-outline information of the smallest cell in the character "" from the second outline information of the character "". Since the smallest element of the character "" includes: eight sections "" -, two, "i", and one "woman", therefore their corresponding minimum unit sub-profile information is shown in table 4.

TABLE 4 sub-outline information correspondence table

Name (R) Minimum unit sub-profile information
Part1 "+" - "sub-outline information
Part2 Sub-outline information of' eye
Part3 Sub-profile information of "vertical" "and horizontal
Part4 Sub-outline information of "I
Part5 Sub-outline information of' eye
Part6 (iv) deContour information
Part7 Sub-outline information of "I
Part8 Child profile information for a woman

Secondly, the terminal device can combine the sub-outline information of each minimum unit, and identify the character unit of the target character according to the combination result.

Specifically, if all the combination results can be matched to the corresponding sub-outline information in the second character unit set in one combination mode, the combination mode is determined to be the combination mode meeting the condition. The terminal equipment determines the character unit of the target character according to the combination mode. It is understood that one character unit may include one or more minimum units.

For example, the Part 1-Part 8 of the character "" may be combined into four parts: part1, Part 2-Part 4, Part 5-Part 7, and Part 8. Since Part1 can be matched to "-sub-contour information in the second character unit set, Part 2-Part 4 and Part 5-Part 7 can be matched to" "sub-contour information in the second character unit set, and Part8 can be matched to" woman "sub-contour information in the second character unit set. Therefore, the combination is determined to satisfy the condition.

Finally, the terminal device can recognize that the character units corresponding to "" are respectively: "" - "," "", "", "female". And in conjunction with table 3, it can be determined that the "-.

In addition, since the sub-outline information of the minimum unit includes the display position of the outer outline in the character display region, the position information of the character units "+", "", "", "", "female" can also be specified from Part1, Part2 to Part4, Part5 to Part7, and Part8, respectively.

For example, referring to fig. 9, the terminal device may recognize that the character unit of "" includes, according to the second outline information of the character of "": "-", two "" and "woman". Also, the terminal apparatus can determine that "-.

Optionally, the terminal device may recognize the target character according to a character unit maximization principle, so as to reduce the number of character units as much as possible. Specifically, if the sub-outline information of the target character minimum unit includes a plurality of combination ways satisfying the condition, the character unit is determined according to the combination way with the least number of groups.

For example, for the character "", the combination of the sub-outline information of the minimum unit whose condition is satisfied includes combination 1 and combination 2. Wherein, the combination mode 1 is as follows: part1, Part 2-Part 4, Part 5-Part 7 and Part 8; the combination mode 2 is as follows: part1, Part2, Part3 to Part4, Part5, Part6 to Part7, and Part 8. According to the character unit maximization principle, the terminal device determines the character unit in '' as: "-", "", "", "woman", instead of in combination 2, the character unit in "" is determined to be: "+", "eyes", "eight" and "woman".

And S803, the terminal equipment displays the target character in the first font according to the sub-outline information corresponding to the first font of each character unit and the position information.

After identifying the character units of the target character, the terminal device may call the sub-outline information of the first font of each character unit from the first character unit set according to the identification information of the character units. For example, the terminal device may determine the sub-outline information of "-", "", "", and "female" of the first font from the corresponding first character unit set according to the identification information "1", "2", and "3", respectively.

After determining the sub-outline information of the first font of each character unit in the target character from the first character unit set, the terminal device may display the target character in a plurality of ways.

In one possible implementation manner, the terminal device may generate the first outline information of the target character according to the sub-outline information and the position information of the first font of each character unit in the target character. Subsequently, the target character is displayed in a first font according to the generated first outline information. In addition, the terminal device may further store the generated first outline information into the first font packet. It can be understood that when the terminal device encounters the target character again, the first outline information of the terminal device can be directly called from the first font packet, and the target character is displayed in the first font, so that the efficiency of displaying the character by the terminal device is improved.

Illustratively, taking the first font pack as an F font pack, and the character to be displayed as "", as an example, the terminal device generates and stores the first outline information of "" after determining the sub-outline information of the F font of the character units "-", "", and "woman" included in the character "", and the position information of the character units "-", "", and "woman" in the character "", and then displays the character "" in the F font according to the first outline information.

Since the sub-outline information of each character unit of the "" word corresponds to the F font, the first outline information that the terminal device finally generates "" also corresponds to the F font. And, the "" finally displayed by the terminal device according to the first outline information is also in F font.

In another possible implementation manner, first, the terminal device determines a display area of the target character in the display interface. Then, according to the position information of each character unit in the target character, the display position of each character unit in the display area is determined. And finally, displaying each character unit in a first font according to the sub-outline information of each character unit in the target character at the corresponding display position, thereby displaying the target character in the first font.

For example, a method of displaying the character "" in the F font will be described with the first font pack being an F font pack. First, as shown in fig. 10a, for example, the terminal device determines the display area of the character "" in the display interface. Subsequently, as shown in fig. 10b, for example, the terminal apparatus determines the display positions of the character units "+", "", and "woman" in the character "" based on the position information of these character units in the display area. Wherein, the display position of the character unit "+" - "is the position (r), the display position of" "is the position (r) and the position (r), and the display position of" woman "is the position (r). Finally, for example, as shown in fig. 10c, the terminal device displays "+", "in the F font at position (r) based on the" + "-" sub-profile information, and displays "" in the F font at position (c) and position (c), respectively, based on the "" sub-profile information; based on the sub-outline information of "woman", the "woman" is displayed in the F font at the position (r), so that the character "" is displayed in the F font.

By adopting the character display method provided by the embodiment, all of the "true " can be displayed in the display interface in the F font, for example, as shown in fig. 11.

In summary, in the process that the terminal device displays the character in the first font, when encountering a character (e.g., a rarely-used character) that is not included in the first font packet, the character display method provided in this embodiment is adopted, and the first font packet occupying a small memory and the second font packet carried by the terminal device are adopted, so that the character can be intelligently displayed in the first font, the problem of abnormal font display of the terminal device is avoided to a certain extent, and the text reading experience of the user is improved.

In addition, in this embodiment, the first character unit set and the second character unit set may be preset by the terminal device, or may be generated by the terminal device according to a plurality of preset basic feature characters. The generation process of the first and second character unit sets will be described below with reference to fig. 12 and 13, respectively.

Fig. 12 is a flowchart of a method for determining a first character unit set according to an embodiment of the present application. Referring to fig. 12, the method includes steps S1201-S1203 as follows.

And S1201, the terminal device acquires third contour information of a plurality of preset basic characteristic characters from the first font packet.

In the present embodiment, the basic feature characters generally include a plurality of basic feature characters, which include, by way of example and not limitation: "ten", "one hundred million", "grass", "good", "bright", "nuisance", "duck", "feature", "sign", "eight", etc. These basic characteristic characters include most commonly used character units, such as: "-", "", "female", "day", "A", "cun", "Earth", "i", and the like.

Since each character has a unique universal identification, the unique universal identification (e.g., Unicode) of this basic feature character can be preset in the terminal device. According to the preset unique universal identifications, the terminal device can directly call the third profile information of the basic characteristic characters from the first font packet. Wherein the third profile information is used to display the plurality of base feature characters in the first font.

And S1202, the terminal equipment determines the sub-outline information of the first font of all different character units in the plurality of basic characteristic characters according to the third outline information.

In a possible implementation manner, since the basic feature characters are preset, for each basic feature character, the terminal device may be preset with a character unit determination rule, and determine sub-outline information of a character unit therein according to the rule. For example, for the character "bright", among the outline information of "bright", the sub-outline information for the character unit displayed on the left side of "bright" is determined as the sub-outline information of "day"; the sub-outline information for the character unit displayed on the right of "bright" is determined as the sub-outline information of "month".

The terminal equipment determines the rule according to the character unit corresponding to each basic characteristic character, and then the required sub-outline information of the first font of the character unit can be determined from the third outline information of the plurality of basic characteristic characters.

S1203, the terminal device generates a first character unit set according to the sub-outline information of the first font of all different character units in the multiple basic feature characters.

Although the basic characteristic characters are all different, they may include the same character unit. Therefore, when storing the sub-outline information of the character unit in the basic feature character, it is sufficient to store only the sub-outline information of all the different character units. For example, when the basic feature character includes "flower" and "grass" at the same time, the third profile information of the character "flower" includes the sub-profile information of the character units "" - "," seven ", and the third profile information of the character" grass "includes the sub-profile information of the character units" "-", "early". For the repeated character unit "-", only one of the "-sub-profile information may be stored.

Fig. 13 is a flowchart of a method for determining a second character unit set according to an embodiment of the present application. Referring to fig. 13, the method includes the following steps S1301-S1303.

And S1301, the terminal equipment acquires preset fourth outline information of a plurality of basic characteristic characters from the second font packet.

The basic feature characters in step S1301 are the same as the basic feature characters in step S1202, and are not described herein again. Referring to step S1201, in step S1301, according to the unique general identifier preset by the basic feature characters, the terminal device may directly call fourth profile information of the basic feature characters from the second font packet. Wherein the fourth profile information is used to display the plurality of base feature characters in a second font.

And S1302, the terminal equipment determines sub-contour information of second fonts of all different character units in the plurality of basic characteristic characters according to the fourth contour information.

In step S1302, the terminal device may determine sub-profile information of different character units of the second font basic feature character from the fourth profile information of the plurality of basic feature characters according to the character unit determination rule corresponding to each basic feature character. Specifically, refer to step S1202, which is not described in detail in this embodiment.

And S1303, the terminal device generates a second character unit set according to the sub-outline information of the second font of different character units in the plurality of basic characteristic characters.

The terminal equipment stores the sub-outline information of different character units of all second fonts in the basic characteristic characters to form a second character unit set. Specifically, refer to step S1203, which is not described in detail in this embodiment.

It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

The present embodiment also provides a character display apparatus corresponding to the character display method shown in the above embodiments. For convenience of explanation, only portions related to the embodiments of the present application are shown.

Referring to fig. 14, the character display apparatus provided by the embodiment of the present application includes an information acquisition unit 1401, a recognition unit 1402, and a display control unit 1403.

An information obtaining unit 1401, configured to, in displaying a character in a first font, if a target character cannot be displayed in the first font, obtain second outline information of the target character from a second font packet, the second outline information being used for displaying the target character in the second font.

The identifying unit 1402 is configured to identify each character unit in the target character and position information of each character unit in the target character according to the second contour information.

A display control unit 1403 for displaying the target character in the first font based on the sub-outline information corresponding to the first font according to each character unit and the position information.

Optionally, the display control unit 1403 is further configured to determine first outline information of the target character according to the sub-outline information and the position information of each character unit of the target character corresponding to the first font; and displaying the target character in a first font according to the first outline information.

Optionally, the display control unit 1403 is further configured to store the first outline information in a first font packet corresponding to the first font.

Optionally, the display control unit 1403 is further configured to determine a display area of the target character in the display interface; determining the display position of each character unit in the target character in the display area according to the position information; and displaying each character unit in a first font according to the corresponding display position of the sub-outline information so as to display the target character.

Optionally, the sub-outline information is determined according to a plurality of basic feature characters in the first font packet corresponding to the first font, where the plurality of basic feature characters include each character unit in the target character.

Optionally, the display control unit 1403 is further configured to obtain third outline information of the plurality of basic feature characters from the first font packet, where the third outline information is used to display the plurality of basic feature characters in the first font; and determining the sub-contour information according to the third contour information.

The present embodiment also provides a terminal device, which includes a memory, a processor, a display unit, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the character display method provided in the foregoing embodiment is implemented. See fig. 1 for details.

The present embodiment also provides a computer-readable storage medium, which stores a computer program that, when being executed by a processor, implements the steps of the above-described method embodiments.

The computer readable medium may include at least: any entity or device capable of carrying computer program code to a character display device, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier wave signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.

The embodiment of the application also provides a computer program product containing instructions. The computer program product, when run on a computer or processor, causes the computer or processor to perform one or more steps of any of the methods described above.

An embodiment of the present application provides a chip system, where the chip system includes a processor, the processor is coupled with a memory, and the processor executes a computer program stored in the memory to implement the character display method provided in the embodiment of the present application. In this embodiment, the chip system may be a single chip or a chip module formed by a plurality of chips.

In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.

In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optics, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media.

Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.

One of ordinary skill in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the above method embodiments. And the aforementioned storage medium includes: various media capable of storing program codes, such as ROM and RAM.

Finally, it should be noted that: the above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

27页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种字体贴图的动态生成方法、装置、及可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!