CN112596692A - Character display method, device and equipment and computer readable storage medium - Google Patents

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

Info

Publication number
CN112596692A
CN112596692A CN202011488151.8A CN202011488151A CN112596692A CN 112596692 A CN112596692 A CN 112596692A CN 202011488151 A CN202011488151 A CN 202011488151A CN 112596692 A CN112596692 A CN 112596692A
Authority
CN
China
Prior art keywords
characters
character
displayed
width
line
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
CN202011488151.8A
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.)
Hunan New Cloudnet Technology Co ltd
Original Assignee
Hunan New Cloudnet 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 Hunan New Cloudnet Technology Co ltd filed Critical Hunan New Cloudnet Technology Co ltd
Priority to CN202011488151.8A priority Critical patent/CN112596692A/en
Publication of CN112596692A publication Critical patent/CN112596692A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
    • G06F3/1462Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay with means for detecting differences between the image stored in the host and the images displayed on the remote displays

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The application discloses a character display method, a device, equipment and a storage medium, wherein the method comprises the following steps: receiving characters to be displayed, the number of the characters, configuration information and the displayable width of each line, which are sent by a sending end; calculating the total pixel width of the characters to be displayed according to the configuration information, and determining the character width of each character of the characters to be displayed by using the total pixel width and the number of the characters; and when the total pixel width exceeds the displayable width of the first line, performing line feed control on the characters to be displayed according to the displayable width and the character width of each line, and displaying the characters to be displayed according to a line feed control result. According to the method, the total pixel width is calculated according to the configuration information sent by the sending end, the character width of each character is calculated, then line feed display control is carried out on the characters to be displayed according to the displayable width and the character width of each line, the line number formats of the sending end and the receiving end when the characters to be displayed are displayed can be consistent, and the convenience of synchronously checking the information can be further improved.

Description

Character display method, device and equipment and computer readable storage medium
Technical Field
The present invention relates to the field of device display, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for displaying characters.
Background
Along with the rapid development and application of computer technology, the popularization and popularity of intelligent classroom teaching are higher and higher. In the process of intelligent classroom teaching, a teacher needs to send characters to be displayed to receiving ends of students by using a sending end, so that the students can synchronously check the characters to be displayed, which are the same as the sending end, according to the receiving ends. However, the specification and the size of the display screen of the sending end are different from those of the display screens of the receiving ends, so that the line number format of the characters to be displayed at the sending end is different from that of the characters to be displayed at the student end; for example, at the sender, keyword a is shown on line 2, but at the receiver, keyword a is shown on line 4; this makes it difficult for the teacher and the student to view the characters to be displayed simultaneously.
Therefore, how to make the line number formats of the sending end and the receiving end consistent when displaying the characters to be displayed, so as to improve the convenience of synchronously checking the characters to be displayed is a technical problem that needs to be solved by technical personnel in the field at present.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a character display method, which can make the line number formats of a sending end and a receiving end consistent when displaying a character to be displayed, so as to improve the convenience of synchronously viewing the character to be displayed; another object of the present invention is to provide a character display apparatus, a device and a computer readable storage medium, all having the above-mentioned advantages.
To solve the above technical problem, the present invention provides a character display method, comprising:
receiving characters to be displayed, the number of the characters, configuration information and the displayable width of each line, which are sent by a sending end;
calculating the total pixel width of the characters to be displayed according to the configuration information, and determining the character width of each character of the characters to be displayed by using the total pixel width and the number of the characters;
and when the total pixel width exceeds the displayable width of the first row, performing line feed control on the characters to be displayed according to the displayable width of each row and the character width, and displaying the characters to be displayed according to a line feed control result.
Preferably, when the total pixel width exceeds the displayable width of the top row, the process of performing line feed control on the character to be displayed according to the displayable width of each row and the character width, and displaying the character to be displayed according to a line feed control result specifically includes:
when the total pixel width exceeds the displayable width of the first row, sequentially accumulating the character width of each character of each row according to the display sequence of each character of the character to be displayed to obtain the accumulated character width;
and when the accumulated character width is larger than the displayable width of the corresponding line, controlling line feed until all characters in the characters to be displayed are calculated, and displaying the characters to be displayed according to a line feed control result.
Preferably, the process of receiving the characters to be displayed, the number of characters, the configuration information, and the displayable width of each line, which are sent by the sending end, specifically includes:
receiving a display instruction sent by the sending end;
judging whether the information to be displayed corresponding to the display instruction is a character or not;
and if so, acquiring the characters to be displayed, the number of the characters, the configuration information and the displayable width of each line according to the display instruction.
Preferably, after the obtaining the characters to be displayed, the number of characters, the configuration information, and the displayable width of each line according to the display instruction, the method further includes:
judging whether the characters to be displayed are a plurality of characters or not according to the number of the characters;
if yes, the step of calculating the total pixel width of the characters to be displayed according to the configuration information and determining the character width of each character of the characters to be displayed by using the total pixel width and the number of the characters is carried out.
Preferably, the configuration information specifically includes: type of font size, type of font style, and type of font.
Preferably, after performing line feed control on the character to be displayed according to the displayable width of each line and the character width when the total pixel width exceeds the displayable width of the top line, and displaying the character to be displayed according to a line feed control result, the method further includes:
and determining the current display line number corresponding to the character to be displayed.
Preferably, after the determining the current display line number corresponding to the character to be displayed, the method further includes:
receiving a preset display line number of the character to be displayed sent by the sending end when the character to be displayed is displayed at the sending end;
judging whether the current display line number is consistent with the preset display line number or not;
if not, sending out corresponding prompt information.
In order to solve the above technical problem, the present invention further provides a character display device, including:
the receiving module is used for receiving the characters to be displayed, the number of the characters, the configuration information and the displayable width of each line, which are sent by the sending end;
the calculation module is used for calculating the total pixel width of the characters to be displayed according to the configuration information and determining the character width of each character of the characters to be displayed by using the total pixel width and the number of the characters;
and the control module is used for performing line feed control on the characters to be displayed according to the displayable width of each line and the character width and displaying the characters to be displayed according to a line feed control result when the total pixel width exceeds the displayable width of the first line.
In order to solve the above technical problem, the present invention further provides a character display device, including:
a memory for storing a computer program;
a processor for implementing the steps of any of the above character display methods when executing the computer program.
In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of any one of the above character display methods.
The invention provides a character display method, which comprises the following steps: receiving characters to be displayed, the number of the characters, configuration information and the displayable width of each line, which are sent by a sending end; calculating the total pixel width of the characters to be displayed according to the configuration information, and determining the character width of each character of the characters to be displayed by using the total pixel width and the number of the characters; and when the total pixel width exceeds the displayable width of the first line, performing line feed control on the characters to be displayed according to the displayable width of each line and the character width, and displaying the characters to be displayed according to a line feed control result. Therefore, the method calculates the total pixel width according to the configuration information sent by the sending end, calculates the character width of each character, and then performs line feed display control on the characters to be displayed according to the displayable width and the character width of each line, so that the characters to be displayed on each line of the receiving end can be consistent with the characters to be displayed on each line of the sending end, namely, the line formats of the sending end and the receiving end when the characters to be displayed are consistent, and the method can improve the convenience of synchronously checking information.
In order to solve the technical problem, the invention also provides a character display device, equipment and a computer readable storage medium, which have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a character display method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for displaying characters according to an embodiment of the present invention;
FIG. 3 is a flowchart of another character display method according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a structure of a character display apparatus according to an embodiment of the present invention;
fig. 5 is a structural diagram of a character display device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The core of the embodiment of the invention is to provide a character display method, which can ensure that the line number formats of a sending end and a receiving end are consistent when the characters to be displayed are displayed, thereby improving the convenience of synchronously checking the characters to be displayed; another core of the present invention is to provide a character display apparatus, a device and a computer readable storage medium, all having the above-mentioned advantages.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flowchart of a character display method according to an embodiment of the present invention. As shown in fig. 1, a character display method includes:
s10: receiving characters to be displayed, the number of the characters, configuration information and displayable width of each line, which are sent by a sending end.
Firstly, it should be noted that the character display method provided in the embodiments of the present invention is mainly applied to a receiving end that establishes a long connection with a sending end in advance; in addition, the sending end and the receiving end in this embodiment refer to different intelligent terminals, the intelligent terminals may be devices such as a learning machine, a tablet computer, and a mobile phone, and the specific type of the intelligent terminal is not limited in this embodiment.
Specifically, in actual operation, the receiving end first obtains corresponding characters to be displayed, the number of the characters and the displayable width of each line according to the display instruction sent by the sending end; the characters to be displayed refer to characters which need to be displayed at the receiving end, the number of the characters refers to the number of the characters to be displayed, the configuration information is specifically information which affects the character width of the characters, such as font size, font type and the like, and the embodiment does not limit the specific information corresponding to the configuration information; the displayable width of each line refers to the display width represented by the pixels respectively corresponding to each line when the transmitting end displays the character to be displayed.
S20: and calculating the total pixel width of the characters to be displayed according to the configuration information, and determining the character width of each character of the characters to be displayed by using the total pixel width and the number of the characters.
After acquiring the characters to be displayed, the number of the characters, the configuration information and the displayable width of each line, the receiving end calculates the total pixel width of the characters to be displayed according to the configuration information, and determines the character width of each character of the characters to be displayed by using the total pixel width and the number of the characters. The total pixel width is the character width of all characters corresponding to the characters to be displayed, and the character width of each character of the characters to be displayed is obtained by dividing the total pixel width by the number of the characters.
S30: and when the total pixel width exceeds the displayable width of the first line, performing line feed control on the characters to be displayed according to the displayable width and the character width of each line, and displaying the characters to be displayed according to a line feed control result.
In this step, after the total pixel width is determined, the total pixel width is compared with the displayable width of the first line in the acquired displayable widths of each line, and when the total pixel width exceeds the displayable width of the first line, it indicates that line feed processing is currently required. Specifically, line feed control is performed on characters to be displayed according to the displayable width of each line of the sending end, that is, it is determined which character needs to be displayed in another line, and the characters to be displayed are displayed according to a line feed control result.
It should be noted that, in actual operation, there are two scenarios:
the first method comprises the following steps: the screen size of the transmitting end is smaller than or equal to the screen size of the receiving end. In this case, when the total pixel width exceeds the displayable width of the first line, it indicates that line feed processing is required, so that line feed control is performed on the characters to be displayed according to the displayable width and character width of each line, and the characters to be displayed are displayed according to the line feed control result; otherwise, it means that the sending end and the receiving end can display the characters to be displayed in one line, i.e. line feed control is not required.
And the second method comprises the following steps: the screen size of the transmitting end is larger than that of the receiving end. In this case, there may be a case that the line feed is not yet performed by the sending end, but the line corresponding to the receiving end cannot be added with characters, and at this time, the display page of the receiving end needs to be controlled to be reduced according to the preset proportion, so that the displayable width of each line of the sending end is smaller than or equal to the displayable width of each line of the receiving end; and performing line feed control on the characters to be displayed according to the displayable width and the character width of each line, and displaying the characters to be displayed according to a line feed control result.
The character display method provided by the embodiment of the invention comprises the following steps: receiving characters to be displayed, the number of the characters, configuration information and the displayable width of each line, which are sent by a sending end; calculating the total pixel width of the characters to be displayed according to the configuration information, and determining the character width of each character of the characters to be displayed by using the total pixel width and the number of the characters; and when the total pixel width exceeds the displayable width of the first line, performing line feed control on the characters to be displayed according to the displayable width of each line and the character width, and displaying the characters to be displayed according to a line feed control result. Therefore, the method calculates the total pixel width according to the configuration information sent by the sending end, calculates the character width of each character, and then performs line feed display control on the characters to be displayed according to the displayable width and the character width of each line, so that the characters to be displayed on each line of the receiving end can be consistent with the characters to be displayed on each line of the sending end, namely, the line formats of the sending end and the receiving end when the characters to be displayed are consistent, and the method can improve the convenience of synchronously checking information.
Fig. 2 is a flowchart of another character display method according to an embodiment of the present invention. On the basis of the above embodiment, this embodiment further explains and optimizes the technical solution, specifically, as shown in fig. 2, in another character display method, S30: when the total pixel width exceeds the displayable width of the first line, performing line feed control on the characters to be displayed according to the displayable width of each line and the character width, and displaying the characters to be displayed according to a line feed control result, specifically comprising the following steps:
s31: when the total pixel width exceeds the displayable width of the first line, sequentially accumulating the character width of each character of each line according to the display sequence of each character of the character to be displayed, and obtaining the accumulated character width;
s32: and when the width of the accumulated character is larger than the displayable width of the corresponding line, controlling line feed until all characters in the characters to be displayed are calculated, and displaying the characters to be displayed according to a line feed control result.
In actual operation, when the total pixel width exceeds the displayable width of the first line, it is determined that the line feed control is currently required. Specifically, the characters to be displayed are split into individual single characters, the single characters are sequentially added into a preset array corresponding to the number of lines according to the display sequence of each character of the characters to be displayed, and the accumulated character width corresponding to each character in the preset array is obtained; then judging whether the accumulated character width is larger than the displayable width of the corresponding line; if yes, indicating that the current character needs to be line-changed, adding the character into another preset array, and continuously calculating the accumulated character width corresponding to each character in the other preset array; and repeating the steps until all the characters in the characters to be displayed are added into the corresponding preset arrays, calculating all the characters in the characters to be displayed, and finishing the calculation.
And finally, displaying the character to be displayed according to the line feed control result. In actual operation, the characters to be displayed can be displayed according to the line feed control result after all line feed control results are determined, or the characters to be displayed can be displayed according to the line feed control result when the line feed is determined to be needed each time; or the characters to be displayed can be displayed word by word, and line feed is carried out according to a line feed control result when line feed is required; the embodiment does not specifically limit the specific way of displaying the character to be displayed according to the line feed control result.
As a preferred embodiment, the configuration information specifically includes: type of font size, type of font style, and type of font.
It should be noted that the font size is the size of the font size; the font type comprises information such as thickening, inclination and the like; font types include regular script, song script, clerical script, and the like.
Therefore, line feed control is performed on the characters to be displayed according to the mode of the embodiment, and the operation mode is convenient and fast.
Fig. 3 is a flowchart of another character display method according to an embodiment of the present invention. On the basis of the above embodiment, this embodiment further explains and optimizes the technical solution, specifically, as shown in fig. 3, in another character display method, S10: the process of receiving characters to be displayed, the number of the characters, configuration information and the displayable width of each line, which are sent by a sending end, specifically comprises the following steps:
s11: receiving a display instruction sent by a sending end;
s12: judging whether the information to be displayed corresponding to the display instruction is a character or not;
s13: and if so, acquiring characters to be displayed, the number of the characters, configuration information and the displayable width of each line according to the display instruction.
Specifically, in this embodiment, a display instruction sent by the sending end is received first, where the display instruction includes relevant information of information to be displayed, and the specific type of the display instruction is not limited in this embodiment. Then judging whether the information to be displayed corresponding to the display instruction is a character or not; if yes, acquiring characters to be displayed, the number of the characters, configuration information and the displayable width of each line according to the display instruction; if not, that is, the information to be displayed is an image or audio, the process proceeds to S40: and ending the process. It should be noted that the characters in this embodiment may be characters of chinese characters, english characters, and the like, which is not limited in this embodiment.
As a preferred embodiment, after acquiring the characters to be displayed, the number of characters, and the displayable width of each line according to the display instruction, the method further includes:
s14: judging whether the characters to be displayed are a plurality of characters or not according to the number of the characters; if yes, proceed to S20: and calculating the total pixel width of the characters to be displayed according to the configuration information, and determining the character width of each character of the characters to be displayed by using the total pixel width and the number of the characters.
In this embodiment, after the number of characters of the character to be displayed is obtained according to the display instruction, whether the character to be displayed is a plurality of characters is further determined according to the number of characters; if yes, proceed to S20: calculating the total pixel width of the characters to be displayed according to the configuration information, and determining the character width of each character of the characters to be displayed by using the total pixel width and the number of the characters; otherwise, it indicates that the current character to be displayed is a single character, and the line feed control is not required, then the process proceeds to S40: and ending the process.
More specifically, since the line feed operation is generally required only when the number of characters exceeds a certain value, both at the transmitting end and at the receiving end, in the actual operation, it is possible to determine whether the number of characters is greater than the preset number threshold, and in the case that the number of characters is greater than the preset number threshold, the process proceeds to S20: and calculating the total pixel width of the characters to be displayed according to the configuration information, and determining the character width of each character of the characters to be displayed by using the total pixel width and the number of the characters.
As can be seen, the embodiment further determines whether line feed control is required, including determining whether the information to be displayed corresponding to the display instruction is a character, and determining whether the character to be displayed is a plurality of characters when it is determined that the information to be displayed is a character; the line feed control is carried out under the condition that the line feed control is determined to be needed, and the line feed control flow is not entered under the condition of non-characters or a small number of characters, so that the character display efficiency can be improved, and the system resources are saved.
On the basis of the foregoing embodiment, this embodiment further explains and optimizes the technical solution, and specifically, after performing line feed control on the characters to be displayed according to the displayable width and the character width of each line and displaying the characters to be displayed according to the line feed control result when the total pixel width exceeds the displayable width of the first line, this embodiment further includes:
and determining the current display line number corresponding to the character to be displayed.
Specifically, in this embodiment, after the receiving end displays the character to be displayed according to the line number format of the sending end, the current display line number corresponding to the currently displayed character is further determined. It should be noted that, in an actual operation, line number statistics may be performed after all characters of the characters to be displayed are displayed to obtain a current display line number, or line number statistics may be performed each time line feed control is performed to obtain a current display line number, which is not limited in this embodiment.
It is thus clear that this embodiment can be convenient for the user to know the number of lines that the character that waits to display corresponds directly perceivedly through further determining the current display number of lines that corresponds with the character that waits to display, can further promote user's use and experience.
On the basis of the foregoing embodiment, the present embodiment further describes and optimizes the technical solution, and specifically, after determining the current display line number corresponding to the character to be displayed, the present embodiment further includes:
receiving a preset display line number of characters to be displayed sent by a sending end when the characters to be displayed are displayed at the sending end;
judging whether the current display line number is consistent with a preset display line number or not;
if not, sending out corresponding prompt information.
It should be noted that, in this embodiment, on the basis of determining the current display line number corresponding to the character to be displayed, the preset display line number sent by the sending end is further received, where the preset display line number is the line number corresponding to the character to be displayed when the sending end displays the character to be displayed; then comparing the current display line number with a preset display line number, and judging whether the current display line number is consistent with the preset display line number; if the number of lines of the character to be displayed is consistent with the number of lines of the character to be displayed, the number of lines of the character to be displayed is further determined to be consistent with the number of lines of the character to be displayed when the character to be displayed is displayed at the sending end, and therefore convenience of synchronously checking the character to be displayed at the sending end and the receiving end can be further guaranteed; if the number of lines of the character to be displayed is inconsistent with the number of lines of the character to be displayed at the sending end, the number of lines of the character to be displayed at the receiving end is inconsistent, and therefore the preset prompting device is further triggered to send out corresponding prompting information, for example, a buzzer, an indicator light, a display and other prompting devices are triggered to send out corresponding buzzing sounds, flashing lights, characters or images and the like, so that a user can know that the currently displayed character to be displayed is not synchronous in time, and the use experience of the user is further improved.
The above detailed description is made for the embodiment of the character display method provided by the present invention, and the present invention also provides a character display apparatus, a device and a computer-readable storage medium corresponding to the method.
Fig. 4 is a structural diagram of a character display apparatus according to an embodiment of the present invention, and as shown in fig. 4, the character display apparatus includes:
a receiving module 41, configured to receive characters to be displayed, the number of characters, configuration information, and a displayable width of each line, which are sent by a sending end;
the calculating module 42 is configured to calculate a total pixel width of the character to be displayed according to the configuration information, and determine a character width of each character of the character to be displayed by using the total pixel width and the number of the characters;
and the control module 43 is configured to perform line feed control on the characters to be displayed according to the displayable width and the character width of each line when the total pixel width exceeds the displayable width of the first line, and display the characters to be displayed according to a line feed control result.
The character display device provided by the embodiment of the invention has the beneficial effects of the character display method.
As a preferred embodiment, in another character display device, the control module specifically includes:
the determining submodule is used for sequentially accumulating the character width of each character of each row according to the display sequence of each character of the character to be displayed when the total pixel width exceeds the displayable width of the first row, so as to obtain the accumulated character width;
and the control submodule is used for controlling line feed until all characters in the characters to be displayed are calculated when the accumulated character width is larger than the displayable width of the corresponding line, and displaying the characters to be displayed according to a line feed control result.
As a preferred embodiment, in another character display device, the receiving module specifically includes:
the receiving submodule is used for receiving the display instruction sent by the sending end;
the first judgment submodule is used for judging whether the information to be displayed corresponding to the display instruction is a character or not; if yes, calling an acquisition submodule;
and the acquisition submodule is used for acquiring characters to be displayed, the number of the characters, the configuration information and the displayable width of each line according to the display instruction.
As a preferred embodiment, another character display apparatus further comprises:
the second judgment submodule is used for judging whether the characters to be displayed are a plurality of characters or not according to the number of the characters; if yes, the calculation module is called.
As a preferred embodiment, another character display apparatus further comprises:
and the line number determining module is used for determining the current display line number corresponding to the character to be displayed.
As a preferred embodiment, another character display apparatus further comprises:
the line number receiving module is used for receiving the preset display line number of the character to be displayed sent by the sending end when the character is displayed at the sending end;
the line number judging module is used for judging whether the current display line number is consistent with the preset display line number or not; if not, calling a prompt module;
and the prompt module is used for sending out corresponding prompt information.
Fig. 5 is a structural diagram of a character display apparatus according to an embodiment of the present invention, and as shown in fig. 5, the character display apparatus includes:
a memory 51 for storing a computer program;
and a processor 52 for implementing the steps of the character display method as described above when executing the computer program.
The character display device provided by the embodiment of the invention has the beneficial effects of the character display method.
In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the above character display method.
The computer-readable storage medium provided by the embodiment of the invention has the beneficial effects of the character display method.
The character display method, apparatus, device and computer readable storage medium provided by the present invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are set forth only to help understand the method and its core ideas of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

Claims (10)

1. A character display method, comprising:
receiving characters to be displayed, the number of the characters, configuration information and the displayable width of each line, which are sent by a sending end;
calculating the total pixel width of the characters to be displayed according to the configuration information, and determining the character width of each character of the characters to be displayed by using the total pixel width and the number of the characters;
and when the total pixel width exceeds the displayable width of the first row, performing line feed control on the characters to be displayed according to the displayable width of each row and the character width, and displaying the characters to be displayed according to a line feed control result.
2. The method according to claim 1, wherein the process of performing line feed control on the character to be displayed according to the displayable width of each line and the character width and displaying the character to be displayed according to a line feed control result when the total pixel width exceeds the displayable width of a top line specifically comprises:
when the total pixel width exceeds the displayable width of the first row, sequentially accumulating the character width of each character of each row according to the display sequence of each character of the character to be displayed to obtain the accumulated character width;
and when the accumulated character width is larger than the displayable width of the corresponding line, controlling line feed until all characters in the characters to be displayed are calculated, and displaying the characters to be displayed according to a line feed control result.
3. The method according to claim 1, wherein the process of receiving the characters to be displayed, the number of characters, the configuration information, and the displayable width of each line, which are sent by the sending end, specifically comprises:
receiving a display instruction sent by the sending end;
judging whether the information to be displayed corresponding to the display instruction is a character or not;
and if so, acquiring the characters to be displayed, the number of the characters, the configuration information and the displayable width of each line according to the display instruction.
4. The method according to claim 3, wherein after the obtaining the characters to be displayed, the number of characters, the configuration information, and the displayable width of each line according to the display instruction, the method further comprises:
judging whether the characters to be displayed are a plurality of characters or not according to the number of the characters;
if yes, the step of calculating the total pixel width of the characters to be displayed according to the configuration information and determining the character width of each character of the characters to be displayed by using the total pixel width and the number of the characters is carried out.
5. The method according to claim 1, wherein the configuration information specifically includes: type of font size, type of font style, and type of font.
6. The method according to any one of claims 1 to 5, wherein after performing line feed control on the character to be displayed according to the displayable width of each line and the character width when the total pixel width exceeds the displayable width of a top line, and displaying the character to be displayed according to a line feed control result, the method further comprises:
and determining the current display line number corresponding to the character to be displayed.
7. The method of claim 6, wherein after determining the number of currently displayed lines corresponding to the character to be displayed, further comprising:
receiving a preset display line number of the character to be displayed sent by the sending end when the character to be displayed is displayed at the sending end;
judging whether the current display line number is consistent with the preset display line number or not;
if not, sending out corresponding prompt information.
8. A character display apparatus, comprising:
the receiving module is used for receiving the characters to be displayed, the number of the characters, the configuration information and the displayable width of each line, which are sent by the sending end;
the calculation module is used for calculating the total pixel width of the characters to be displayed according to the configuration information and determining the character width of each character of the characters to be displayed by using the total pixel width and the number of the characters;
and the control module is used for performing line feed control on the characters to be displayed according to the displayable width of each line and the character width and displaying the characters to be displayed according to a line feed control result when the total pixel width exceeds the displayable width of the first line.
9. A character display apparatus, characterized by comprising:
a memory for storing a computer program;
a processor for implementing the steps of the character display method according to any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps of the character display method according to any one of claims 1 to 7.
CN202011488151.8A 2020-12-16 2020-12-16 Character display method, device and equipment and computer readable storage medium Pending CN112596692A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011488151.8A CN112596692A (en) 2020-12-16 2020-12-16 Character display method, device and equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011488151.8A CN112596692A (en) 2020-12-16 2020-12-16 Character display method, device and equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112596692A true CN112596692A (en) 2021-04-02

Family

ID=75196773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011488151.8A Pending CN112596692A (en) 2020-12-16 2020-12-16 Character display method, device and equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112596692A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1835415A1 (en) * 2004-12-03 2007-09-19 Sony Computer Entertainment Inc. Display, display control method, and information storage medium
CN102147790A (en) * 2011-04-15 2011-08-10 华为软件技术有限公司 Text type-setting method and type-setting engine
TW201243624A (en) * 2011-04-26 2012-11-01 Zeon Corp The process for solving the font missing problem
US20160357710A1 (en) * 2015-06-05 2016-12-08 Alpine Electronics, Inc. Text display control apparatus and method for controlling text to be displayed
CN111062186A (en) * 2019-12-06 2020-04-24 金蝶软件(中国)有限公司 Text processing method and device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1835415A1 (en) * 2004-12-03 2007-09-19 Sony Computer Entertainment Inc. Display, display control method, and information storage medium
CN102147790A (en) * 2011-04-15 2011-08-10 华为软件技术有限公司 Text type-setting method and type-setting engine
TW201243624A (en) * 2011-04-26 2012-11-01 Zeon Corp The process for solving the font missing problem
US20160357710A1 (en) * 2015-06-05 2016-12-08 Alpine Electronics, Inc. Text display control apparatus and method for controlling text to be displayed
CN111062186A (en) * 2019-12-06 2020-04-24 金蝶软件(中国)有限公司 Text processing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110390616A (en) Work correction method, electronic equipment and storage medium
CN107197355B (en) Bullet screen display method and device
CN113590066A (en) Full-automatic multi-screen splicing method, device, equipment and storage medium
CN111259277A (en) Intelligent education test question library management system and method
CN111326038A (en) Method, device and system for teaching
CN112004113A (en) Teaching interaction method, device, server and storage medium
CN108845955B (en) Chinese input method test method and device and electronic equipment
CN111489595B (en) Method and device for feeding back test information in live broadcast teaching process
CN112596692A (en) Character display method, device and equipment and computer readable storage medium
CN111489596A (en) Method and device for information feedback in live broadcast teaching process
CN105185171A (en) Learning method and apparatus used for intelligent terminal, and intelligent terminal
CN112840305B (en) Font switching method and related product
EP3306462A1 (en) Display device, and display signal input system and display signal input method thereof
CN108681531B (en) Document input control method and device
CN112306329B (en) Information processing method, device, equipment and storage medium
CN108513158B (en) Method and device for playing on-line answering content
CN113449649A (en) Scanning display method and system based on interconnection of scanning pen and intelligent terminal
CN109918156B (en) Video interface processing method and system
CN108108138B (en) Intelligent pen box, image display method thereof and computer readable storage medium
CN112820151A (en) Computer multimedia teaching system, teaching method, terminal and medium for thinking and political affairs education
CN112954444A (en) Method and device for loading signaling file, storage medium and electronic equipment
CN111787127A (en) Classroom information transmission method and classroom information transmission system
CN111598746A (en) Teaching interaction control method, device, terminal and storage medium
CN117830044B (en) Interactive teaching data management system and method based on cloud computing
CN104079474A (en) Information transmission method, system and mobile terminal based on image identification

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210402