Character display method, device, equipment and computer readable storage medium
By receiving display instructions and obtaining Unicode encoding, the address information of word module data is directly obtained in the target file, and the problems of slow character display speed and complex encoding in the prior art are solved, and more efficient character display is achieved.
Patent Information
- Application Number
- CN202110223034.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-26
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-02-26
AI Technical Summary
When displaying characters, the prior art requires converting character sets from various languages into microcontroller-readable binary encoding files through conversion tools, resulting in complex encoding rules, consuming hardware resources and reducing character display speed.
By receiving display instructions, the Unicode encoding of characters is obtained, and the address information of the word-module data is obtained according to the Unicode encoding in the target file, and the word-module data is directly displayed to the display interface, avoiding the use of conversion tools.
This method saves the MCU's time to convert characters, improves the display speed of word-module data, and simplifies the character display process.
Smart Images

Figure CN112949257B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of display technology, and in particular to a character display method, device, equipment and computer-readable storage medium. Background Art
[0002] In LCD keyboard applications, in order to display text content files on the LCD screen, the text content is usually stored independently in the FLASH memory, then read by the MCU, and finally driven and displayed on the LCD screen.
[0003] The LCD screen can display the languages of various countries in the world. Different countries have their own corresponding character set encoding, such as ASCII code, GB2312 character set, GB12345-90 character set, GBK character set, BIG5 character set, universal character set (UCS) character set, etc. Therefore, when the LCD keyboard displays the language character sets of multiple countries, it is necessary to use the commonly used character sets of each country respectively, and be familiar with the encoding arrangement and addressing method of each character set. Then develop the corresponding character set conversion tool, that is, use the conversion tool to convert the character set of each country into a binary encoding file that can be read by the microcontroller. Then the converted binary encoding file is burned into the memory for easy reading by the MCU, but using this method to find each character set requires writing the corresponding encoding addressing method, the encoding rules are complicated, and each language character set needs to develop the corresponding character set conversion tool, which is time-consuming and laborious. Summary of the invention
[0004] The embodiments of the present application provide a character display method, apparatus, device and computer-readable storage medium, aiming to solve the technical problem of wasting terminal hardware resources and reducing the display speed of characters to be displayed when converting the characters to be displayed into Unicode encoding through a conversion tool.
[0005] To achieve the above object, the present application provides a character display method, comprising:
[0006] Receive a display instruction, and obtain the Unicode code of the character corresponding to the display instruction;
[0007] Acquire address information of font data corresponding to the Unicode code in a target file according to the Unicode code, wherein the target file includes characters and Unicode codes of various languages and address information of a plurality of font data;
[0008] The font data is obtained according to the address information, and the font data is displayed on a display interface.
[0009] Optionally, the step of acquiring address information of font data corresponding to the Unicode encoding in the target file according to the Unicode encoding includes:
[0010] Determine the language type corresponding to the Unicode encoding;
[0011] Get the addressing mode of the language type;
[0012] The address information of the font data corresponding to the Unicode encoding is calculated according to the addressing mode.
[0013] Optionally, the step of calculating address information of the font data corresponding to the Unicode encoding according to the addressing mode includes:
[0014] Get the low and high bits of the Unicode code respectively;
[0015] Performing a difference operation between the high bit and the high bit of the initial code of the language type to obtain a first difference;
[0016] Performing a difference operation between the low bit and the low bit of the initial encoding of the language type to obtain a second difference;
[0017] The first difference is moved by the target number of bits in the target direction and then added to the second difference. The added value is multiplied by the size of the font data to obtain the address information of the font data in the target file.
[0018] Optionally, before the step of acquiring address information of font data corresponding to the Unicode encoding in the target file according to the Unicode encoding, the step includes:
[0019] Acquire characters in various languages and parameter information corresponding to the characters;
[0020] Convert the characters and parameter information into a Unicode configuration file according to Unicode conversion rules;
[0021] The Unicode configuration file and the font file are combined to obtain the target file.
[0022] Optionally, before the step of merging the Unicode configuration file with the font file to obtain the target file, the step includes:
[0023] Copy the characters of each language type to the font generator in order;
[0024] Controlling the font generator to generate the font data from the character;
[0025] The font data is saved to obtain the font file.
[0026] Optionally, the step of controlling the font generator to generate the font data from the character comprises:
[0027] Get the resolution of characters corresponding to each language type;
[0028] The font generator is controlled to generate the font data from the character according to the resolution.
[0029] Optionally, after the step of obtaining characters in various languages and parameter information corresponding to the characters, the method further includes:
[0030] Checking the character and the parameter information;
[0031] When errors exist in the characters and the parameter information, the characters and the parameter information are adjusted.
[0032] In addition, to implement the above embodiment, the present application also provides a character display method device, including:
[0033] A first acquisition module, used for receiving a display instruction and acquiring a Unicode code of a character corresponding to the display instruction;
[0034] A second acquisition module is used to acquire address information of font data corresponding to the Unicode code in a target file according to the Unicode code, wherein the target file includes characters and Unicode codes of various languages and address information of multiple font data;
[0035] A display module is used to obtain the font data according to the address information and display the font data on a display interface.
[0036] In addition, to implement the above embodiments, the present application also provides a character display method device, which includes a processor, a memory, and a character display program stored in the memory and executable on the processor, and the character display program implements the steps of any of the above character display methods when executed by the processor.
[0037] In addition, to implement the above embodiments, the present application also provides a computer-readable storage medium, on which a character display program is stored. When the character display program is executed by a processor, the steps of any of the above character display methods are implemented.
[0038] In the present application, when a display instruction input by a user is received, the Unicode encoding of the character corresponding to the display instruction is obtained based on the current display interface, and then the corresponding font data is obtained in the target file through the Unicode encoding, and then the font data is displayed on the display interface. The corresponding Unicode encoding can be directly obtained according to the display instruction when the display instruction is received, and the address information of the corresponding font data can be directly found according to the Unicode encoding in the target file containing the Unicode encoding and the font data, and then the font data is read through the address information, and the font data is displayed on the display interface. There is no need to convert the characters to be displayed into computer-readable Unicode encodings through a conversion tool when a switching instruction is received, and then obtain the font data corresponding to the Unicode encoding. It is convenient for MCU to read, saves the time required for MCU to convert characters, and improves the speed of font data display. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present application;
[0040] Figure 2 This is a flow chart of an embodiment of a character display method of the present application;
[0041] Figure 3 This is a flow chart of another embodiment of the character display method of the present application;
[0042] Figure 4 A flowchart of another embodiment of the character display method of the present application;
[0043] Figure 5 This is a schematic diagram of the functional modules of the character display method of this application.
[0044] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0045] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] The main solution of the embodiment of the present application is: receiving a display instruction, obtaining the Unicode code of the character corresponding to the display instruction; obtaining the address information of the font data corresponding to the Unicode code in the target file according to the Unicode code, and the target file includes characters and Unicode codes of various languages, and address information of multiple font data; obtaining the font data according to the address information, and displaying the font data on the display interface.
[0047] In the prior art, when the LCD keyboard displays language character sets of multiple countries, it is necessary to use the commonly used character sets of each country and understand the encoding arrangement and addressing method of each character set. Then, a corresponding character set conversion tool is developed, that is, the character set of each country is converted into a binary code file readable by the microcontroller through the conversion tool. The converted binary code file is then burned into the memory for easy reading and display by the MCU.
[0048] like Figure 1 As shown, Figure 1 This is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present application.
[0049] like Figure 1 As shown, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0050] Optionally, the terminal may also include a camera, an RF (Radio Frequency) circuit, a sensor, a remote controller, an audio circuit, a WiFi module, a detector, etc. Of course, the terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a temperature sensor, etc., which will not be described in detail here.
[0051] Those skilled in the art will understand that Figure 1 The terminal structure shown in the figure does not constitute a limitation on the terminal device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0052] like Figure 1 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a character display program.
[0053] exist Figure 1In the terminal shown, the network interface 1004 is mainly used to connect to the backend server and perform data communication with the backend server; the user interface 1003 is mainly used to connect to the client (user end) and perform data communication with the client; and the processor 1001 can be used to call the character display program stored in the memory 1005 and perform the following operations:
[0054] Receive a display instruction, and obtain the Unicode code of the character corresponding to the display instruction;
[0055] Acquire address information of font data corresponding to the Unicode code in a target file according to the Unicode code, wherein the target file includes characters and Unicode codes of various languages and address information of a plurality of font data;
[0056] The font data is obtained according to the address information, and the font data is displayed on a display interface.
[0057] refer to Figure 2 , Figure 2 This is a flow chart of the first embodiment of the character display method of the present application.
[0058] The embodiments of the present application provide embodiments of a method for displaying characters. It should be noted that, although a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different from that shown here.
[0059] Character display methods include:
[0060] Step S10, receiving a display instruction, and obtaining a Unicode code of a character corresponding to the display instruction;
[0061] The method in the present application can be applied to any terminal composed of an LCD screen, such as a mobile phone, computer, television, etc. with an LCD screen. The terminal can receive a switching instruction input by a user, and control the display of different font data on the terminal's display interface - the LCD screen according to the switching instruction, so that the user can read and perform corresponding control operations.
[0062] The display instruction includes a startup instruction input by the user when initializing the terminal device, and a switching instruction for switching the current display interface. The display instruction can be received by an external hardware device connected to the terminal, such as a mouse, keyboard, remote control, etc., or by a key connected thereto.
[0063] In the present application, the display instruction input by the user can be obtained, and then the Unicode code of the character corresponding to the display instruction can be displayed.
[0064] It is understandable that the characters described in the present application are characters stored in the target file in advance. Specifically, the characters are displayed correspondingly through a preset connection relationship, so that when a switching instruction is received, the characters corresponding to the switching instruction can be searched according to the connection relationship. For example, in the target file, the first-level titles include riding methods, time, and fare, and the second-level titles include subway, bicycle riding, and taxi. The time corresponding to different transportation methods is 20 minutes, 30 minutes, and 15 minutes, respectively, and the fare spent is 8 yuan, 2 yuan, and 16 yuan. Only the first-level title is displayed in the initial interface. When the user clicks on the riding time of the first-level title, it is considered that the user needs to display the second-level title corresponding to the time in the display interface, and 20 minutes, 30 minutes, and 15 minutes are displayed in the display interface. It is understandable that the display method in the display interface can be displayed according to the size set by the font data corresponding to the characters such as 20 minutes, 30 minutes, and 15 minutes and the size of the screen.
[0065] The Unicode code is the universal code of the character to be displayed. It can be understood that all characters in the machine language are stored in Unicode code. In this application, the characters to be displayed in the display interface are stored in a one-to-one manner with their Unicode codes, so that when the display instruction is obtained, the Unicode code of the character corresponding to the display instruction can be obtained.
[0066] Step S20, acquiring address information of font data corresponding to the Unicode code in a target file according to the Unicode code, wherein the target file includes characters and Unicode codes of various languages, and address information of a plurality of font data.
[0067] The target file is a combined file of the configuration file and the font file, including characters and Unicode encoding of various languages, parameter information, address information of multiple font data and other information.
[0068] In the present application, when merging the configuration file and the font file, the Unicode encoding sequence corresponding to the characters in the configuration file can be matched with each font data in the font file in order, the font data can be controlled to be converted according to the Unicode sequence when converted by the font conversion tool, and the font data can be stored in the font file. Therefore, the address information of the font data corresponding to the character can be directly obtained after the character is determined.
[0069] Step S30, obtaining the font data according to the address information, and displaying the font data on a display interface.
[0070] The MCU of the terminal reads the address information of the font data, obtains the font data through the read address information, and displays it on the display interface.
[0071] In the present application, when a display instruction input by a user is received, the Unicode encoding of the character corresponding to the display instruction is obtained based on the current display interface, and then the corresponding font data is obtained in the target file through the Unicode encoding, and then the font data is displayed on the display interface. The corresponding Unicode encoding can be directly obtained according to the display instruction when the display instruction is received, and the address information of the corresponding font data can be directly found according to the Unicode encoding in the target file containing the Unicode encoding and the font data, and then the font data is read through the address information, and the font data is displayed on the display interface. There is no need to convert the characters to be displayed into computer-readable Unicode encodings through a conversion tool when a switching instruction is received, and then obtain the font data corresponding to the Unicode encoding. It is convenient for MCU to read, saves the time required for MCU to convert characters, and improves the speed of font data display.
[0072] Reference Figure 3 , Figure 3 The step of obtaining the address information of the font data corresponding to the Unicode encoding in the target file according to the Unicode encoding comprises:
[0073] Step S21, determining the language type corresponding to the Unicode encoding;
[0074] It is understandable that the current characters are divided into 17 groups, 0x0000 to 0x10FFFF, each group is called a plane, and each plane has 65536 code points, a total of 1114112. Unicode encoding converts characters from all countries in the world into Unicode encoding that can be read by computers. Specifically, the characters required by the languages used in various countries are assigned corresponding Unicode encoding ranges.
[0075] Step S22, obtaining the addressing mode of the language type;
[0076] The addressing method is a method for obtaining address information of font data.
[0077] In this embodiment, different Unicode code ranges are used according to different language types in different countries, so when the Unicode code is obtained, the language type of the Unicode code can be determined by the obtained Unicode code, and the addressing method corresponding to the language type can be further obtained. Different countries have different corresponding addressing methods.
[0078] Step S23, calculating and obtaining address information of the font data corresponding to the Unicode encoding according to the addressing mode.
[0079] Then, the address information of the font data corresponding to the Unicode encoding is calculated through the addressing method.
[0080] The step of calculating and obtaining the font data corresponding to the Unicode encoding according to the addressing mode comprises:
[0081] Step S231, respectively obtaining the low bit and the high bit of the Unicode code;
[0082] Step S232, performing a difference operation between the high bit and the high bit of the initial code of the language type to obtain a first difference;
[0083] Step S233, performing a difference operation between the low bit and the low bit of the initial code of the language type to obtain a second difference;
[0084] Step S234, moving the first difference by the target number of bits in the target direction and adding the first difference to the second difference, and multiplying the added value by the size of the font data to obtain the address information of the font data in the target file.
[0085] The target direction may be the direction in which the high bit needs to be moved when the high bit and the low bit are added, and the target number of bits is the number of bits that the high bit needs to be moved when the high bit and the low bit are added. Specifically, in the embodiment, the first difference is the difference of the high bit, and the second difference is the difference of the low bit. When the high bit and the low bit are added, the first difference (high bit) is first moved to the left. The storage byte of Unicode encoding in this application is 2B, so when the high bit and the low bit are added, the high bit needs to be shifted to the left by one byte, that is, 8 bits, that is, the value of the high bit is expanded by 2. 8 (256) times.
[0086] It can be understood that each Unicode code storage byte is 2B, the high bit is the first byte of the storage byte, and the low bit is the second byte of each Unicode code storage byte. The high bit is the Unicode code. In this embodiment, after obtaining the Unicode code, the high bit and low bit of the Unicode code are obtained.
[0087] Furthermore, the high-order part of the Unicode encoding is used to perform a difference operation with the high-order part of the initial encoding of the language type to obtain a first difference, and then the low-order part of the Unicode encoding is used to perform a difference operation with the low-order part of the initial encoding of the language type to obtain a second difference. The first difference is shifted left by 8 bits and then added to the second difference, and the value obtained by the addition is multiplied by the size of the font data to obtain the address information of the font data in the target file. The following is a specific example: When the obtained Unicode encoding is 529F, and it is within the range of 4E00 - 9FFF of the Chinese Unicode encoding, it is confirmed that the language type of the Unicode encoding is Chinese, and the addressing method F for the Chinese type is: F = [(H - 0x4E) * 256 + (L - 0x00)] * 28
[0088] H: The high-order part of the Chinese character, L: The low-order part of the Chinese character, and the size of the font data of the Chinese type is 28 bytes;
[0089] Through the Unicode encoding 0x529f of the character "功", its high-order part H = 0x52 and low-order part L = 0x9f are obtained. Then, through the addressing method, the addressing address is obtained as [(0x52 - 0x4E) * 256 + (0x9f - 0x00)] * 28 = 0x8164 (decimal 33124), obtaining the address information of "功" in the target file, and then the font data of "功" is obtained through the address information 0x8164.
[0090] The above initial encoding can be set independently by the user, and it is not limited to the Unicode encoding of the first character corresponding to the language type. In the embodiment, the initial encodings of different languages can also be set to the Unicode encodings in the middle of the language range. Thus, the time required to traverse the font data one by one with the first character as the Unicode encoding is shortened, and the efficiency of obtaining the font data is improved.
[0091] Refer to Figure 4 , Figure 4 This is a schematic flowchart of another embodiment of the present application. Before the step of obtaining the font data corresponding to the Unicode encoding in the target file according to the Unicode encoding, it includes:
[0092] Step S01, obtaining characters including various languages and parameter information corresponding to the characters;
[0093] Step S02, converting the characters and parameter information into a Unicode configuration file according to the Unicode conversion rules;
[0094] Step S03, merging the Unicode configuration file and the font file to obtain the target file.
[0095] In this application, it is first necessary to set characters of different language types and parameter information corresponding to the characters. The parameter information includes the display size of the characters, etc.
[0096] The characters and the parameter information corresponding to the characters are converted into a hexadecimal Unicode configuration file through the conversion rules of the Unicode conversion tool. For example, for the character "功", it is converted into "529F" for storage. Then, the Unicode configuration file is merged with the font file to obtain the target file. Furthermore, when the Unicode encoding is read, the address information of the font data corresponding to the Unicode encoding can be obtained from the target file, and thus the font data can be obtained without going through the process of encoding arrangement, improving the acquisition efficiency of the font data.
[0097] Before the step of merging the Unicode configuration file with the font file to obtain the target file, it includes:
[0098] Step S04, copying the characters of each language type to the font generator in sequence;
[0099] Step S05, controlling the font generator to generate the font data from the characters;
[0100] Step S06, saving the font data to obtain the font file.
[0101] The font data is retrieved according to the character range corresponding to each country's character set. For example, the range of the basic Chinese character set is 4E00 - 9FFF, with a total of 20,902 Chinese characters, and the range of the basic Latin alphabet is 0020 - 007F, with a total of 96 characters. Numbered in the order of the arrangement of each language's characters, the font data is generated through font software to obtain the font file, providing a basis for the MCU to obtain the font data through Unicode encoding. The step of controlling the font generator to generate the font data from the characters includes:
[0102] Step S051, obtaining the resolution of the characters corresponding to each language type;
[0103] Step S052, controlling the font generator to generate the font data from the characters according to the resolution.
[0104] In this application, when the font data is generated in the font generator according to the encoding order of the characters, the Unicode encoding is controlled to generate the font data.
[0105] The font data is made according to the size allocated for each character by the LCD liquid crystal screen display, so as to display the font data on the LCD display screen according to the preset size.
[0106] After the step of obtaining characters in various languages and parameter information corresponding to the characters, the method further includes:
[0107] Step S07, checking the characters and the parameter information;
[0108] Step S08: When errors exist in the characters and the parameter information, adjust the characters and the parameter information.
[0109] In the present application, before the characters and parameter information generate the corresponding Unicode encoding, it is also possible to check whether there are errors in the characters and parameter information. When errors exist, the erroneous characters and parameter information are adjusted, thereby improving the correctness of generating the Unicode configuration file.
[0110] In addition, refer to Figure 5 , Figure 5 To implement the above embodiment, the present application also provides a character display method and device, including:
[0111] A first acquisition module 10 is used to receive a display instruction and acquire a Unicode code of a character corresponding to the display instruction;
[0112] A second acquisition module 20 is used to acquire address information of font data corresponding to the Unicode code in a target file according to the Unicode code, wherein the target file includes characters and Unicode codes of various languages and address information of multiple font data;
[0113] The display module 30 is used to obtain the font data according to the address information and display the font data on a display interface.
[0114] In addition, to implement the above embodiments, the present application also provides a character display method device, which includes a processor, a memory, and a character display program stored in the memory and executable on the processor, and the character display program implements the steps of any of the above character display methods when executed by the processor.
[0115] In addition, to implement the above embodiments, the present application also provides a computer-readable storage medium, on which a character display program is stored. When the character display program is executed by a processor, the steps of any of the above character display methods are implemented.
[0116] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0117] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0118] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0119] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0120] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The present application may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0121] Although the optional embodiments of the present application have been described, those skilled in the art, once informed of the basic creative concept, may make additional changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including optional embodiments and all changes and modifications falling within the scope of the present application.
[0122] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A character display method, characterized in that: The character display method comprises: Receiving a display instruction, and obtaining the Unicode code of the character corresponding to the display instruction according to a preset connection relationship between characters and a one-to-one storage method between characters and Unicode codes; Acquire characters in various languages and parameter information corresponding to the characters; Convert the characters and parameter information into a Unicode configuration file according to Unicode conversion rules; Copy the characters of each language type to the font generator in order; Controlling the font generator to generate font data from the character; Saving the font data to obtain a font file; Merging the Unicode configuration file with the font file to obtain a target file; Acquire address information of font data corresponding to the Unicode code in a target file according to the Unicode code, wherein the target file includes characters and Unicode codes of various languages and address information of a plurality of font data; Obtain the font data according to the address information, and display the font data on a display interface; The step of obtaining address information of the font data corresponding to the Unicode encoding in the target file according to the Unicode encoding includes: Determine the language type corresponding to the Unicode encoding; Get the addressing mode of the language type; Get the low and high bits of the Unicode code respectively; Performing a difference operation between the high bit and the high bit of the initial code of the language type to obtain a first difference; Performing a difference operation between the low bit and the low bit of the initial encoding of the language type to obtain a second difference; The first difference is moved by the target number of bits in the target direction and then added to the second difference. The added value is multiplied by the size of the font data to obtain the address information of the font data in the target file.
2. The character display method according to claim 1, characterized in that: The step of controlling the font generator to generate the font data from the character comprises: Get the resolution of characters corresponding to each language type; The font generator is controlled to generate the font data from the character according to the resolution.
3. The character display method according to claim 1, characterized in that: After the step of obtaining characters in various languages and parameter information corresponding to the characters, the method further includes: Checking the character and the parameter information; When errors exist in the characters and the parameter information, the characters and the parameter information are adjusted.
4. A character display method and device, characterized in that: include: A first acquisition module is used to receive a display instruction, and acquire the Unicode code of the character corresponding to the display instruction according to a preset connection relationship between characters and a one-to-one storage method between characters and Unicode codes; Acquire characters in various languages and parameter information corresponding to the characters; Convert the characters and parameter information into a Unicode configuration file according to Unicode conversion rules; Copy the characters of each language type to the font generator in order; Controlling the font generator to generate font data from the character; Saving the font data to obtain a font file; Merging the Unicode configuration file with the font file to obtain a target file; A second acquisition module is used to acquire address information of font data corresponding to the Unicode code in a target file according to the Unicode code, wherein the target file includes characters and Unicode codes of various languages and address information of multiple font data; A display module, used for obtaining the font data according to the address information, and displaying the font data on a display interface; The step of obtaining address information of the font data corresponding to the Unicode encoding in the target file according to the Unicode encoding includes: Determine the language type corresponding to the Unicode encoding; Get the addressing mode of the language type; Get the low and high bits of the Unicode code respectively; Performing a difference operation between the high bit and the high bit of the initial code of the language type to obtain a first difference; Performing a difference operation between the low bit and the low bit of the initial encoding of the language type to obtain a second difference; The first difference is moved by the target number of bits in the target direction and then added to the second difference. The added value is multiplied by the size of the font data to obtain the address information of the font data in the target file.
5. A character display method and device, characterized in that: The character display method device comprises a processor, a memory, and a character display program stored in the memory and executable on the processor. When the character display program is executed by the processor, the steps of the character display method according to any one of claims 1 to 3 are implemented.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a character display program, and when the character display program is executed by a processor, the steps of the character display method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Embedded equipment and method for displaying language word on OSD interface
CN102141916A