CN114791843A - Character display method, device, equipment and storage medium - Google Patents

Character display method, device, equipment and storage medium Download PDF

Info

Publication number
CN114791843A
CN114791843A CN202210707919.9A CN202210707919A CN114791843A CN 114791843 A CN114791843 A CN 114791843A CN 202210707919 A CN202210707919 A CN 202210707919A CN 114791843 A CN114791843 A CN 114791843A
Authority
CN
China
Prior art keywords
displayed
characters
information
character
text
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210707919.9A
Other languages
Chinese (zh)
Inventor
李林峰
汪杨刚
杨明洁
邓伯华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Haiwei Technology Co ltd
Original Assignee
Wuhan Haiwei Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Haiwei Technology Co ltd filed Critical Wuhan Haiwei Technology Co ltd
Priority to CN202210707919.9A priority Critical patent/CN114791843A/en
Publication of CN114791843A publication Critical patent/CN114791843A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/454Multi-language systems; Localisation; Internationalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/109Font handling; Temporal or kinetic typography
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/126Character encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention belongs to the field of character display, and discloses a character display method, a character display device, character display equipment and a storage medium. The method comprises the following steps: inquiring primitive data corresponding to the characters to be displayed according to the character information to be displayed; generating dot matrix bitmap data of the characters to be displayed according to the primitive data; and displaying the characters to be displayed according to the dot matrix bitmap data. The invention generates the dot matrix bitmap data of the characters to be displayed according to the graphic element data corresponding to the characters to be displayed; and displaying the characters to be displayed according to the dot matrix bitmap data. Compared with the existing mode of displaying the characters through the bitmap data of the characters to be displayed, the mode disclosed by the invention can save the storage space and reduce the character display cost.

Description

Character display method, device, equipment and storage medium
Technical Field
The present invention relates to the field of text display technologies, and in particular, to a text display method, apparatus, device, and storage medium.
Background
The vehicle-mounted handheld controller is electronic equipment adopting an embedded system. The vehicle-mounted handheld controller is mainly used for facilitating passengers (particularly rear-row passengers) in the automobile to control non-driving functions (including air conditioners, wifi, Bluetooth, audio and video and the like) of the automobile. The GUI system of the low-cost vehicle-mounted handheld controller can be realized based on a light-weight general-purpose graphic library. The Light and Vertical Graphics Library (LVGL) is a new GUI system framework, and has the advantages of small code amount and easy development of User Interface (UI).
LVGL currently supports only basic english and character icons by default in multi-language displays. For the display of other languages, a corresponding C-language bitmap description array needs to be generated for each character to be displayed, and the LVGL system stores and loads bitmap data of the character to be displayed, and then displays the bitmap data. In most cases, the characters to be displayed are uncertain (e.g., song names and person names in chinese or japanese), and thus it is necessary to store and load bitmap data of all the commonly used chinese or other language characters. Moreover, every time a font with a different size is added, a whole set of bitmap data corresponding to the size of the font needs to be added. However, the memory space of the embedded device system with low cost is limited, and if storing bitmap data of all common characters of a font, a large storage space needs to be added, which is high in cost. If bitmap data of common characters of a font of an arbitrary size is to be stored, the required storage space is difficult to calculate, and the cost is also difficult to calculate.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a character display method, a character display device, a character display equipment and a storage medium, and aims to solve the technical problems of large required storage space and high cost caused by storing bitmap data of all characters when an LVGL system in the prior art displays multi-language characters.
In order to achieve the above object, the present invention provides a text display method, comprising the steps of:
inquiring primitive data corresponding to the characters to be displayed according to the character information to be displayed;
generating dot matrix bitmap data of the characters to be displayed according to the primitive data;
and displaying the characters to be displayed according to the dot matrix bitmap data.
Optionally, the step of querying primitive data corresponding to the text to be displayed according to the text information to be displayed includes:
pre-compiling the character information to be displayed to obtain binary character information;
inquiring a preset vector information base according to the binary character information to obtain vector information of characters to be displayed;
and determining the primitive data corresponding to the characters to be displayed according to the vector information.
Optionally, the step of determining, according to the vector information, primitive data corresponding to the text to be displayed includes:
determining the character code of each character in the characters to be displayed according to the vector information;
inquiring a preset character index table according to the character codes to obtain the position of the primitive data;
and determining the primitive data of each character in the characters to be displayed according to the primitive data position.
Optionally, the step of generating dot matrix bitmap data of the text to be displayed according to the primitive data includes:
determining character display information according to the character information to be displayed;
acquiring font global information of the characters to be displayed;
and generating dot matrix bitmap data of the characters to be displayed according to the character display information, the font global information and the primitive data.
Optionally, after the step of generating dot matrix bitmap data of the text to be displayed according to the primitive data, the method further includes:
acquiring a font adjusting instruction of a user;
determining target font information according to the font adjusting instruction;
and generating dot matrix bitmap data of the characters to be displayed according to the target font information, the font global information and the primitive data.
Optionally, before the step of querying primitive data corresponding to the text to be displayed according to the text information to be displayed, the method further includes:
when a vector information pre-storing instruction is received, determining vector information to be stored according to the vector information pre-storing instruction;
and storing the vector information to be stored into a preset vector information base.
Optionally, after the step of querying primitive data corresponding to the text to be displayed according to the text information to be displayed, the method further includes:
when the primitive data corresponding to the characters to be displayed are not inquired, acquiring preset filling data;
and taking the filling data as the graphic element data of the characters to be displayed.
In addition, to achieve the above object, the present invention also provides a character display apparatus, comprising:
the primitive data query module is used for querying the primitive data corresponding to the characters to be displayed according to the information of the characters to be displayed;
the dot matrix bitmap data generation module is used for generating dot matrix bitmap data of the characters to be displayed according to the primitive data;
and the display module is used for displaying the characters to be displayed according to the dot matrix bitmap data.
In addition, to achieve the above object, the present invention further provides a text display device, including: a memory, a processor, and a text display program stored on the memory and executable on the processor, the text display program configured to implement the steps of the text display method as described above.
In addition, to achieve the above object, the present invention further provides a storage medium, wherein the storage medium stores a text display program, and the text display program realizes the steps of the text display method as described above when being executed by a processor.
The method comprises the steps of inquiring primitive data corresponding to characters to be displayed according to information of the characters to be displayed; generating dot matrix bitmap data of the characters to be displayed according to the primitive data; and displaying the characters to be displayed according to the dot matrix bitmap data. The invention generates the dot matrix bitmap data of the characters to be displayed according to the graphic element data corresponding to the characters to be displayed; and displaying the characters to be displayed according to the dot matrix bitmap data. Compared with the existing mode of displaying the characters through the bitmap data of the characters to be displayed, the mode disclosed by the invention can save the storage space and reduce the character display cost.
Drawings
FIG. 1 is a schematic diagram of a text display device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a text display method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a text display method according to a second embodiment of the present invention;
FIG. 4 is a flowchart illustrating a text display method according to a third embodiment of the present invention;
FIG. 5 is a block diagram of a first embodiment of a text display device according to the present invention.
The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a text display device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the text display apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to implement connection communication among these components. The user interface 1003 may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (WI-FI) interface). The Memory 1005 may be a high-speed Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001 described previously.
Those skilled in the art will appreciate that the configuration shown in fig. 1 is not intended to be limiting of the text display device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a text display program.
In the text display device shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the text display device according to the present invention may be disposed in the text display device, and the text display device calls the text display program stored in the memory 1005 through the processor 1001 and executes the text display method according to the embodiment of the present invention.
Based on the text display device, an embodiment of the present invention provides a text display method, and referring to fig. 2, fig. 2 is a schematic flow diagram of a first embodiment of the text display method according to the present invention.
In this embodiment, the text display method includes the following steps:
step S10: and inquiring the primitive data corresponding to the characters to be displayed according to the information of the characters to be displayed.
It should be noted that the execution main body of the embodiment may be a computing service device with data processing, network communication, and program running functions, such as a mobile phone, a tablet computer, a personal computer, or an electronic device or a text display device capable of implementing the above functions. The present embodiment and the following embodiments will be described below by taking the above-described character display device as an example.
It should be noted that the text display device may be an electronic device that uses LVGL as a GUI system framework, and may be configured to display text information in TTF font. The text information to be displayed may be a TTF file of information to be displayed on the text display device. The text to be displayed may be text to be displayed on the text display device. The primitive data may be text outline definition values and grid adjustment instruction values.
It should be understood that the TrueType font design is designed for a reference grid, and the primitives in the font are represented by coordinates in the reference grid. The size of the reference grid thus determines the way in which the primitives for the font are scaled and also reflects the quality of the font. The vector information of the character comprises a font head of the font, and the font head stores the number of grids in each grid and a bounding box capable of containing all primitives. The primitive data is the core information of the TrueType font. The description of the primitive is composed of several pieces of information: all contour lines, primitive instructions, and a series of control points. Each control point includes a marker and x and y coordinates.
Contour line: the primitives may contain one or more contour lines. For example, the letter "O" has two contours, one being an inner contour and the other being an outer contour. The primitive outline is defined by a second order Bezier curve, with three points: points on one curve, points outside one curve and points on another curve.
And (3) control points: the control points for the primitives are stored in three arrays: a flag array, an x-coordinate array, and a y-coordinate array. Some type of run length coding is actually used in the flag array. The other bits of the flag are used to describe the encoding of the corresponding x and y coordinates, which may indicate whether the current phase-finding coordinate is the same as the last, positive one-byte value, negative one-byte value, or signed two-byte value.
Primitive instruction: when the font size is changed, the method is used for controlling the transformation of the outline of the primitive in the grid.
Further, in order to enable the text display device to display more texts, before step S10, the method further includes: when a vector information pre-storing instruction is received, determining vector information to be stored according to the vector information pre-storing instruction; and storing the vector information to be stored into a preset vector information base.
It should be noted that the vector information pre-storing instruction may be an instruction sent by the user to the text display device to store the vector information of each text set in advance, where the vector information of each text set in advance by the user is included. The vector information to be stored may be the vector information corresponding to the characters preset by the user. The preset vector information base may be a database or a data table in the text display device for storing vector information to be stored. And storing the graphic primitive data corresponding to the characters to be displayed in the vector information corresponding to the characters to be displayed. The preset vector information base can store the vector information of commonly used Chinese characters and the vector information of commonly used characters such as Japanese and Korean characters.
Further, since the vector information corresponding to all the characters may not be generally contained in the preset vector information base, some characters in the characters to be displayed may not store their corresponding vector information in the preset vector information base, and at this time, the characters that do not store their corresponding vector information in the preset vector information base cannot be displayed by the character display device, so that, in order to reduce the reading hindrance of the user as much as possible when the above situation occurs, after the step S10, the method further includes: when the primitive data corresponding to the characters to be displayed are not inquired, acquiring preset filling data; and taking the filling data as the graphic element data of the characters to be displayed.
It should be noted that the preset padding data may be preset data used as primitive data of a character when the primitive data corresponding to the character is not found. Can be a custom padding identification.
Step S20: and generating dot matrix bitmap data of the characters to be displayed according to the primitive data.
It should be noted that, the generating of the dot matrix bitmap data of the text to be displayed according to the primitive data may be dynamically generating dot matrix bitmap data corresponding to the text to be displayed by calling a decoding method of a TTF format parsing library according to the primitive data and font size information set by a user by a TTF text parser in the text display device. The font size information set by the user may include the size of the font set by the user, line spacing, word height, word width, word spacing, whether to thicken, and the like.
In a specific implementation, a specific process of generating dot matrix bitmap data from primitive data of a text, that is, a decoding manner, may be:
s1, judging whether the size of the characters changes: if the size of the character is changed, executing a primitive instruction to obtain a transformed outline and a control point; if the size is not changed, no transformation is needed;
s2, scanning the contour line of the character primitive data and the control points on the contour line as the input of the matrix transformation operation formula;
s3, performing matrix operation to obtain a two-dimensional array description value of the two-dimensional spatial position;
s4, calculating and outputting the specific dot matrix bitmap data according to the description value and the bitmap format.
Step S30: and displaying the characters to be displayed according to the dot matrix bitmap data.
It should be noted that the displaying of the text to be displayed according to the dot matrix bitmap data may be a drawing of the text according to the dot matrix bitmap data in a preset drawing manner, so as to display the text to be displayed.
In the embodiment, the primitive data corresponding to the characters to be displayed are inquired according to the information of the characters to be displayed; generating dot matrix bitmap data of the characters to be displayed according to the primitive data; and displaying the characters to be displayed according to the dot matrix bitmap data. In the embodiment, the dot matrix bitmap data of the characters to be displayed is generated according to the primitive data corresponding to the characters to be displayed; and displaying the characters to be displayed according to the dot matrix bitmap data. Compared with the existing mode of displaying characters through bitmap data of all characters to be displayed, the mode of the embodiment can save storage space and reduce character display cost.
Referring to fig. 3, fig. 3 is a flow chart illustrating a text display method according to a second embodiment of the invention.
Based on the first embodiment described above, in the present embodiment, the step S10 includes:
step S101: and pre-compiling the character information to be displayed to obtain binary character information.
It should be noted that the pre-compiling the text information to be displayed may be to store the original binary RAW data corresponding to the text information to be displayed as an array of unsigned bytes of C language, and store the array in a C file. The array of the unsigned bytes of the C language is a data source of the TTF format file, and each unsigned byte in the array is binary data of RAW of the TTF format file; simultaneously recording the structure body variable of the font file in the C file; the structure body adopted by the structure body variable comprises a structure body and a data pointer. And compiling the C file into a binary file and storing the binary file into a firmware image file at the stage of pre-compiling the character information to be displayed, so as to obtain the binary character information.
Step S102: and inquiring a preset vector information base according to the binary character information to obtain the vector information of the characters to be displayed.
It should be noted that the preset vector information base may be a database or a data table for storing each character and its corresponding vector information. The querying of the preset vector information base according to the binary text information may be determining vector information corresponding to each text to be displayed from the preset vector information base according to the binary text information.
Step S103: and determining the primitive data corresponding to the characters to be displayed according to the vector information.
It should be noted that, the determining, according to the vector information, the primitive data corresponding to the text to be displayed may be to acquire the primitive data corresponding to the text to be displayed from the vector information.
Further, in order to reduce the storage cost of the text display device when displaying the text through the text display device, the step S103 may include: determining the character code of each character in the characters to be displayed according to the vector information; inquiring a preset character index table according to the character codes to obtain the position of the primitive data; and determining the primitive data of each character in the characters to be displayed according to the primitive data position.
It should be noted that the character code may be a unicode code of each of the texts to be displayed. The preset character index table may be a comparison table for storing positions of each character and corresponding primitive data. And inquiring a preset character index table through the character codes of all the characters to obtain the primitive data positions of the primitive data corresponding to the characters, and obtaining the primitive data of all the characters in the characters to be displayed according to the primitive data positions.
The embodiment pre-compiles the text information to be displayed to obtain binary text information; inquiring a preset vector information base according to the binary character information to obtain vector information of characters to be displayed; and determining the primitive data corresponding to the characters to be displayed according to the vector information. According to the embodiment, binary text information is obtained by pre-compiling the text information to be displayed; inquiring a preset vector information base according to the binary character information to obtain vector information of characters to be displayed; and determining the primitive data corresponding to the characters to be displayed according to the vector information. And then can according to wait to show the primitive data that the characters correspond and treat and show the characters, for the current mode that carries out the characters display through the bitmap data of each character to be shown, this embodiment above-mentioned mode treats and shows the characters and can save storage space through the primitive data that the characters to be shown correspond, reduces the characters display cost.
Referring to fig. 4, fig. 4 is a schematic flow chart of a text display method according to a third embodiment of the invention.
Based on the foregoing embodiments, in this embodiment, the step S20 specifically includes:
step S201: and determining character display information according to the character information to be displayed.
It should be noted that the text display information may include information set by the user, such as a display font size, a font height, a font width, a line spacing, a font spacing, and whether to display text in bold or italic.
Step S202: and acquiring the global font information of the characters to be displayed.
It should be noted that the font global information of the text to be displayed may be font header information of the text to be displayed stored in the vector information corresponding to the text to be displayed, where the font header information includes a size of a font corresponding to primitive data of the font stored in the vector information corresponding to the text to be displayed. For example, if the font header information is 1 in the vector information of a certain character a to be displayed, the size of the displayed character is 1 after the character display is performed on the primitive data in the vector information corresponding to the character a to be displayed.
Step S203: and generating dot matrix bitmap data of the characters to be displayed according to the character display information, the font global information and the primitive data.
It should be noted that, the generating of the dot matrix bitmap data of the text to be displayed according to the text display information, the font global information, and the primitive data may be adjusting the primitive data according to the font size in the text display information and the font size in the font global information, and generating the dot matrix bitmap data of the text to be displayed according to the adjusted primitive data. For example, the font size in the text display information is 2, and the font size in the font global information is 1, it is known that the font size of the text to be displayed set by the user is twice the font size stored in the vector information of the text to be displayed, and therefore, when displaying the text, it is necessary to adjust the primitive data first, so that when displaying the adjusted primitive data, the font size of the displayed text is the font size set by the user. And after the primitive data are adjusted, generating dot matrix bitmap data of the characters to be displayed according to the information such as character height, character width, line spacing, character spacing, whether to display in bold or italic and the like in the character display information.
Further, in order to enable the user to adaptively adjust the size of the displayed characters, the line spacing and other related information, and to improve the experience of the user, after step S20, the method further includes: acquiring a font adjusting instruction of a user; determining target font information according to the font adjusting instruction; and generating dot matrix bitmap data of the characters to be displayed according to the target font information, the font global information and the primitive data.
The font adjustment instruction may be a command sent by the user to adjust the font size, the font height, the font width, the line spacing, the font spacing, and whether to display the text in bold or italic. The target font information may be the font size, the font height, the font width, the line spacing, the font spacing, whether to display in bold or italic, and the like of the character corresponding to the user adjustment instruction. The generating of the dot matrix bitmap data of the text to be displayed according to the target font information, the font global information, and the primitive data may be adjusting the primitive data according to a font size in the target font information and a font size in a font header in the font global information, and generating the dot matrix bitmap data of the text to be displayed according to other information in the target font information and the adjusted primitive data. The other information may be word height, word width, line spacing, word spacing, and whether displayed in bold or italics.
The embodiment comprises the steps of determining character display information according to the character information to be displayed; acquiring font global information of the characters to be displayed; and generating dot matrix bitmap data of the characters to be displayed according to the character display information, the font global information and the primitive data. In this embodiment, the dot matrix bitmap data of the text to be displayed is generated according to the text display information, the font global information, and the primitive data. The characters to be displayed can be displayed according to the character display information of the characters to be displayed, the display requirements of users are met, and the experience of the users is improved.
Referring to fig. 5, fig. 5 is a block diagram of a first embodiment of a text display device according to the invention.
As shown in fig. 5, the text display device according to the embodiment of the present invention includes:
the primitive data query module 10 is configured to query, according to the information of the text to be displayed, primitive data corresponding to the text to be displayed;
a dot matrix bitmap data generating module 20, configured to generate dot matrix bitmap data of the text to be displayed according to the primitive data;
and the display module 30 is configured to display the text to be displayed according to the dot matrix bitmap data.
In the embodiment, the primitive data corresponding to the characters to be displayed are inquired according to the information of the characters to be displayed; generating dot matrix bitmap data of the characters to be displayed according to the primitive data; and displaying the characters to be displayed according to the dot matrix bitmap data. In the embodiment, dot matrix bitmap data of the characters to be displayed is generated according to the primitive data corresponding to the characters to be displayed; and displaying the characters to be displayed according to the dot matrix bitmap data. Compared with the existing mode of displaying characters through bitmap data of all characters to be displayed, the mode of the embodiment can save storage space and reduce character display cost.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the text display method provided in any embodiment of the present invention, and are not described herein again.
Based on the first embodiment of the text display device of the present invention, a second embodiment of the text display device of the present invention is provided.
In this embodiment, the primitive data query module 10 is further configured to perform pre-compiling on the text information to be displayed, so as to obtain binary text information; inquiring a preset vector information base according to the binary character information to obtain vector information of characters to be displayed; and determining the primitive data corresponding to the characters to be displayed according to the vector information.
Further, the primitive data query module 10 is further configured to determine a character code of each text in the text to be displayed according to the vector information; inquiring a preset character index table according to the character codes to obtain the position of the primitive data; and determining the primitive data of each character in the characters to be displayed according to the primitive data position.
Further, the dot matrix bitmap data generating module 20 is further configured to determine text display information according to the text information to be displayed; acquiring font global information of the characters to be displayed; and generating dot matrix bitmap data of the characters to be displayed according to the character display information, the font global information and the primitive data.
Further, the dot matrix bitmap data generating module 20 is further configured to obtain a font adjusting instruction of the user; determining target font information according to the font adjusting instruction; and generating dot matrix bitmap data of the characters to be displayed according to the target font information, the font global information and the primitive data.
Further, the primitive data querying module 10 is further configured to, when a vector information pre-storing instruction is received, determine vector information to be stored according to the vector information pre-storing instruction; and storing the vector information to be stored into a preset vector information base.
Further, the primitive data query module 10 is further configured to obtain preset filling data when the primitive data corresponding to the text to be displayed is not queried; and taking the filling data as the graphic element data of the characters to be displayed.
Other embodiments or specific implementations of the text display device of the present invention can refer to the above method embodiments, and are not described herein again.
In addition, an embodiment of the present invention further provides a storage medium, where a text display program is stored on the storage medium, and the text display program, when executed by a processor, implements the steps of the text display method described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or system in which the element is included.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present invention or portions thereof contributing to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (such as a rom/ram, a magnetic disk, and an optical disk), and includes several instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all equivalent structures or equivalent processes performed by the present invention or directly or indirectly applied to other related technical fields are also included in the scope of the present invention.

Claims (10)

1. A character display method is characterized by comprising the following steps:
inquiring primitive data corresponding to the characters to be displayed according to the character information to be displayed;
generating dot matrix bitmap data of the characters to be displayed according to the primitive data;
and displaying the characters to be displayed according to the dot matrix bitmap data.
2. The method for displaying words according to claim 1, wherein the step of querying the primitive data corresponding to the words to be displayed according to the information of the words to be displayed comprises:
pre-compiling the character information to be displayed to obtain binary character information;
inquiring a preset vector information base according to the binary character information to obtain vector information of characters to be displayed;
and determining the primitive data corresponding to the characters to be displayed according to the vector information.
3. The method for displaying words according to claim 2, wherein the step of determining the primitive data corresponding to the words to be displayed according to the vector information comprises:
determining the character code of each character in the characters to be displayed according to the vector information;
inquiring a preset character index table according to the character codes to obtain the position of the primitive data;
and determining the primitive data of each character in the characters to be displayed according to the primitive data position.
4. The method for displaying characters according to claim 1, wherein said step of generating dot matrix bitmap data of said characters to be displayed according to said primitive data comprises:
determining character display information according to the character information to be displayed;
acquiring font global information of the characters to be displayed;
and generating dot matrix bitmap data of the characters to be displayed according to the character display information, the font global information and the primitive data.
5. The method for displaying text according to claim 4, wherein after the step of generating dot matrix bitmap data of the text to be displayed according to the primitive data, the method further comprises:
acquiring a font adjusting instruction of a user;
determining target font information according to the font adjusting instruction;
and generating dot matrix bitmap data of the characters to be displayed according to the target font information, the font global information and the primitive data.
6. The method for displaying words according to any one of claims 1-5, wherein before the step of querying the graphic data corresponding to the words to be displayed according to the information of the words to be displayed, the method further comprises:
when a vector information pre-storing instruction is received, determining vector information to be stored according to the vector information pre-storing instruction;
and storing the vector information to be stored into a preset vector information base.
7. The text display method according to any one of claims 1 to 5, wherein after the step of querying the primitive data corresponding to the text to be displayed according to the text information to be displayed, the method further comprises:
when the primitive data corresponding to the characters to be displayed are not inquired, acquiring preset filling data;
and taking the filling data as the graphic element data of the characters to be displayed.
8. A text display device, comprising:
the primitive data query module is used for querying the primitive data corresponding to the characters to be displayed according to the information of the characters to be displayed;
the dot matrix bitmap data generation module is used for generating dot matrix bitmap data of the characters to be displayed according to the primitive data;
and the display module is used for displaying the characters to be displayed according to the dot matrix bitmap data.
9. A text display apparatus, the apparatus comprising: a memory, a processor, and a text display program stored on the memory and executable on the processor, the text display program configured to implement the steps of the text display method of any one of claims 1 to 7.
10. A storage medium having a text display program stored thereon, the text display program, when executed by a processor, implementing the steps of the text display method according to any one of claims 1 to 7.
CN202210707919.9A 2022-06-22 2022-06-22 Character display method, device, equipment and storage medium Pending CN114791843A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210707919.9A CN114791843A (en) 2022-06-22 2022-06-22 Character display method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210707919.9A CN114791843A (en) 2022-06-22 2022-06-22 Character display method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114791843A true CN114791843A (en) 2022-07-26

Family

ID=82463529

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210707919.9A Pending CN114791843A (en) 2022-06-22 2022-06-22 Character display method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114791843A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101008939A (en) * 2007-01-25 2007-08-01 深圳创维-Rgb电子有限公司 Implementation method of dot matrix word library of embedded system
CN101625848A (en) * 2009-07-28 2010-01-13 宁波新然电子信息科技发展有限公司 Realization method of vector font library oriented to embedded platform
CN107092585A (en) * 2017-04-11 2017-08-25 王建明 Mongolian display method and system based on scalable vector graphics
CN112115678A (en) * 2020-09-21 2020-12-22 京东方科技集团股份有限公司 Information display method and device, storage medium and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101008939A (en) * 2007-01-25 2007-08-01 深圳创维-Rgb电子有限公司 Implementation method of dot matrix word library of embedded system
CN101625848A (en) * 2009-07-28 2010-01-13 宁波新然电子信息科技发展有限公司 Realization method of vector font library oriented to embedded platform
CN107092585A (en) * 2017-04-11 2017-08-25 王建明 Mongolian display method and system based on scalable vector graphics
CN112115678A (en) * 2020-09-21 2020-12-22 京东方科技集团股份有限公司 Information display method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
KR20090075693A (en) Rendering and encoding glyphs
JP6157210B2 (en) Document conversion apparatus, document conversion method, and program
CN110853117B (en) Chart drawing method, device, equipment and storage medium
KR101030831B1 (en) Method and apparatus for providing foreign language text display when encoding is not available
KR20060107268A (en) Iteratively solving constraints in a font-hinting language
US9245361B2 (en) Consolidating glyphs of a font
JP3791259B2 (en) Outline smoothing processing method
CN111223155A (en) Image data processing method, image data processing device, computer equipment and storage medium
JP2007517251A (en) Configuration for font scaling
CN114791843A (en) Character display method, device, equipment and storage medium
JP2007240848A (en) Display program, data structure and display device
US10049478B2 (en) Retrieval and display of visual objects
CN115328390A (en) Pointer variable read-write operation method, device, equipment and medium based on C51
CN102681755A (en) Method, device and equipment for realizing display transformation of display object
JP3146771B2 (en) Font rasterizing apparatus and method
JP2010111088A (en) Image forming apparatus
CN111198742B (en) Customized font implementation method, device, terminal and readable storage medium
CN111401001B (en) TextView linear scaling method, textView linear scaling device, textView linear scaling equipment and TextView linear scaling medium
CN116466900A (en) Screen display method
JP2009519551A (en) Inserting objects using a text editor that supports scalable fonts
WO2006077800A1 (en) Character graphic display device, program, and recording medium
KR20020070106A (en) Method of controlling the display of a character based on a dynamic code generation
CN115935902A (en) Method and system for generating Arabic character string resources and embedded equipment
CN115237515A (en) High-performance font loading and rendering method for low-cost vehicle-mounted instrument platform
CN115291984A (en) Display method, device, equipment and storage medium of vehicle instrument

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220726

RJ01 Rejection of invention patent application after publication