CN111144073A - Blank character visualization method and device in online text display system - Google Patents

Blank character visualization method and device in online text display system Download PDF

Info

Publication number
CN111144073A
CN111144073A CN201911402053.5A CN201911402053A CN111144073A CN 111144073 A CN111144073 A CN 111144073A CN 201911402053 A CN201911402053 A CN 201911402053A CN 111144073 A CN111144073 A CN 111144073A
Authority
CN
China
Prior art keywords
character
font
blank
code point
character string
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.)
Granted
Application number
CN201911402053.5A
Other languages
Chinese (zh)
Other versions
CN111144073B (en
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.)
Wensihai Huizhike Technology Co Ltd
Original Assignee
Wensihai Huizhike 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 Wensihai Huizhike Technology Co Ltd filed Critical Wensihai Huizhike Technology Co Ltd
Priority to CN201911402053.5A priority Critical patent/CN111144073B/en
Publication of CN111144073A publication Critical patent/CN111144073A/en
Application granted granted Critical
Publication of CN111144073B publication Critical patent/CN111144073B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

The application provides a blank character visualization method, a blank character visualization device, electronic equipment and a readable storage medium in an online text display system, which are characterized in that a replacement font is preset, and the replacement font is called to display a character string containing blank characters according to the replacement font, so that the blank characters in the character string can be displayed by a visible replacement font, related personnel can effectively distinguish which kind of blank characters the blank characters in the character string are according to the displayed visible replacement font, and the situations of editing/translation errors and the like are avoided to a certain extent.

Description

Blank character visualization method and device in online text display system
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for visualizing blank characters in an online text display system, an electronic device, and a readable storage medium.
Background
In an actual application environment, an interpreter often needs to know which kind of blank character a corresponding blank character is, so that situations such as editing/translation errors are avoided. For example, in french, spaces are required before and after a colon, and one Space before the colon needs to be NBSP (Non-Breaking Space) but not SP (Space, normal Space). At present, various blank characters (such as NBSP, SP, CR (carriage return), LF (line feed), VT (vertical tab) and the like) are displayed according to a blank style without content in an online text display system, which may cause that relevant personnel cannot effectively distinguish which kind of blank character the edited blank character is, thereby possibly causing editing/translation errors and the like.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method, an input method, an apparatus, a device, and a storage medium for visualizing whitespace characters, so as to solve the problem in the related art that various whitespace characters are displayed according to a content-free whitespace pattern, so that a related person cannot effectively distinguish which whitespace character the edited whitespace character is.
The embodiment of the application provides a blank character visualization method in an online text display system, which comprises the following steps:
calling the replacing font;
and displaying the character string containing the blank characters according to the replacing font, wherein the replacing font comprises visible replacing fonts of various types of blank characters.
In the implementation process, the replacement font is preset, and the replacement font is called to display the character string containing the blank characters according to the replacement font, so that the blank characters in the character string can be displayed by the visible replacement font, and related personnel can effectively distinguish which kind of blank characters the blank characters in the character string are according to the displayed visible replacement font, thereby avoiding the situations of editing/translation errors and the like to a certain extent.
Furthermore, the non-blank character in the replaced font is not provided with a corresponding font, so that when the character in the character string does not have the corresponding font in the replaced font, the corresponding font in the original font is displayed.
In the implementation process, the non-blank characters are not provided with the corresponding fonts, so that after the replaced fonts are called, the non-blank characters in the character strings can be displayed by the corresponding fonts in the original fonts, the displayed characters can be more attached to the original display form, the change in display is reduced, and the user experience is improved.
Furthermore, in an online translation system, any character has a unique corresponding code point; the displaying the character string containing the blank character according to the replacing font comprises:
acquiring a current code point corresponding to each character in the character string;
and displaying each character in the character string as a font corresponding to the current code point in the alternative font.
In the implementation process, the current code point corresponding to each character in the character string is obtained, and each character is displayed as the font corresponding to the current code point in the replacement font, so that relevant personnel can effectively distinguish which blank character is the blank character in the character string according to the displayed visible replacement font, and the situations of editing/translation errors and the like are avoided to a certain extent.
Further, before the invoking the alternate font, the method further comprises:
judging whether each character in the character string is a first type blank character, wherein the first type blank character is a character which can not be associated with a visible font;
if any character in the character string is the first type blank character, obtaining a self-defined code point corresponding to the character from a preset code point association table, and replacing the code point at the position of the character with the self-defined code point, wherein the self-defined code point is provided with a corresponding visible font in the replaced font, and the self-defined code point is a free code point in a code point library.
It should be understood that in actual operation, for blank characters such as VT, the current technology cannot realize the association of visible glyphs with the original code points of the blank characters. For the type of blank characters, the blank characters are determined as first type blank characters in advance, before the replacing fonts are called, whether each character in the character string is the first type blank character is judged, if any character in the character string is the first type blank character, a custom code point corresponding to the character is obtained from a preset code point association table, and an original code point at the position of the character is replaced by the custom code point. Therefore, the user-defined code point can be associated with the visible font in the replaced font, and the character can be visualized by calling the replaced font after the original code point of the character is replaced by the user-defined code point. In addition, because the self-defined code points are idle code points in the code point library, the user-defined code points are used, the conflict of characters expressed by the code points can not be caused, and the reliability of the scheme is improved.
Furthermore, the characters corresponding to the custom code points are preset with the same format operation function as the corresponding blank characters.
In the implementation process, the characters corresponding to the custom code points are preset with the format operation functions identical to the corresponding blank characters, so that the same layout effect as the original blank characters is achieved when the characters are displayed, the display effect of the character strings can be more attached to the original display form after the characters are called and the replaced fonts are displayed, the change in display is reduced, and the user experience is improved.
Further, before the invoking the alternate font, the method further comprises:
judging whether each character in the character string is the first type blank character;
if any character in the character string is the first type blank character, obtaining a self-defined code point corresponding to the character from the preset code point association table, and inserting the self-defined code point at the position of the character before the position, wherein the self-defined code point is provided with a corresponding visible font in the replaced font, and the self-defined code point is a free code point in a code point library.
As mentioned above, in the actual operation process, for blank characters such as VT, the current technology can not realize the association of visible glyphs with the original code points of the blank characters. Therefore, in the embodiment of the present application, the first type of blank character may be determined in advance, and before the replacing font is called, it is determined whether each character in the character string is the first type of blank character, if any character in the character string is the first type of blank character, the user-defined code point corresponding to the character is obtained from the preset code point association table, and the user-defined code point is inserted into the position of the character before the position of the character. Therefore, the user-defined code point can be associated with the visible font in the replaced font, and the character can be visualized by calling the replaced font through the user-defined code point after the user-defined code point is inserted into the position of the character before the position of the character. In addition, because the self-defined code points are idle code points in the code point library, the user-defined code points are used, the conflict of characters expressed by the code points can not be caused, and the reliability of the scheme is improved.
Further, the width of the character corresponding to the custom code point is zero, so that when the character corresponding to the custom code point is inserted into the character string, the original format of the character string is not affected while the corresponding visible font is displayed.
In the implementation process, the width of the character corresponding to the custom code point is set to be zero, so that when the alternative font is called for display, the visible character corresponding to the custom code point is overlapped with the blank character positioned behind the visible character, and because the blank character does not display the content, the visible character corresponding to the custom code point can only be seen at the position of the blank character, thereby achieving the effect of visually displaying the blank character, and enabling related personnel to effectively distinguish which kind of blank character the edited blank character is specifically according to the displayed alternative font, thereby avoiding the situations of editing/translation errors and the like to a certain extent. Meanwhile, the original blank characters are reserved, so that the original typesetting layout function of the blank characters can still be kept when the display of the replaced fonts is called, and the user experience is better.
The embodiment of the present application further provides a device for visualizing blank characters in an online text display system, including: the system comprises a calling module and a display processing module;
the calling module is used for calling the replacing font;
and the display processing module is used for displaying the character string containing the blank characters according to the replacing font, wherein the replacing font comprises the visible replacing font of each type of blank characters.
The embodiment of the application also provides electronic equipment, which comprises a processor, a memory and a communication bus; the communication bus is used for realizing connection communication between the processor and the memory; the processor is configured to execute one or more programs stored in the memory to implement any of the above-described whitespace character visualization methods.
Also provided in an embodiment of the present application is a readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement any of the above-mentioned whitespace character visualization methods.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
FIG. 1 is a flow chart illustrating visualization of a blank character input according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a blank character display interface according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram illustrating a correspondence relationship between a type of a blank character and a substitute font according to an embodiment of the present application;
FIG. 4 is a diagram illustrating a comparison between a normal font display and an alternate font display according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a blank character visualization apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a more specific blank character visualization apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
The first embodiment is as follows:
in order to solve the problem that in the related art, various blank characters displayed in an online text display system are displayed according to a blank pattern without content, so that related personnel cannot effectively distinguish which blank character the blank character in a character string has. As shown in fig. 1, fig. 1 is a schematic flowchart of a blank character visualization process provided in an embodiment of the present application.
S101: the replacement font is invoked.
It should be noted that the online text display system described in the embodiment of the present application refers to a system such as a browser or other systems that can implement online text display similar to a browser.
It should be noted that, in the embodiment of the present application, a blank character refers to a character whose font is displayed in a blank form, and includes a normal space, an uninterrupted space, a carriage return, a line feed, a vertical tab, and the like. In a traditional display mode, blank characters are displayed according to a blank pattern without content, and related personnel cannot effectively distinguish which kind of blank characters the edited blank characters are.
It should be further noted that before the scheme provided by the embodiment of the present application is executed, a user may issue a blank character display instruction first, and the online text display system executes the scheme of the present application after receiving the blank character display instruction, so that the blank characters are visualized, and the user can further effectively distinguish which blank character the blank character in the currently displayed character string is. When the blank character display instruction is not received, the online text display system can display in a traditional display mode.
It should be further noted that, in the embodiment of the present application, a corresponding blank character display interface (for example, a button interface 21 in a browser interface as shown in fig. 2) may be provided in a display interface of the online text display system, so that a user may implement issuing a blank character display instruction by triggering the blank character display interface. In addition, in the embodiment of the application, the user can also realize the issuing of the blank character display instruction through the third-party equipment. For example, a blank character display shortcut key may be predefined, and the keyboard is in communication connection with the online text display system, so that the user triggers the blank character display shortcut key on the keyboard, the keyboard may transmit information that the blank character display shortcut key is triggered to the online text display system, and the online text display system may determine that a blank character display instruction is received according to the information that the blank character display shortcut key is triggered.
S102: and displaying the character string containing the blank characters according to the alternative font.
It should be noted that, in the embodiment of the present application, the replacement font includes a visible replacement glyph of each type of blank character, so that after the replacement font is called, the embodiment of the present application can effectively implement visualization of the blank character in the character string.
In the embodiment of the application, any character has a code point which is uniquely corresponding. When the character string containing the blank character is displayed according to the replacing font, the method can be realized by obtaining the current code point corresponding to each character in the character string and then displaying each character in the character string as the font corresponding to the current code point in the replacing font.
Here, it should be noted that a font is a display form of a character, and depends on the existence of the character, when a corresponding character is defined at one code point, it is necessary to define the corresponding font to realize the display of the character, and one character can define a plurality of different fonts.
It should be noted that, in actual operation, for some blank characters (such as CRLF (carriage return line feed), CR, LF, VT, TAB (TAB), etc.), the current technology cannot realize the association of visible glyphs with the original code points of the blank characters. In order to realize the visualization of the blank characters, the following possible implementation manners are provided in the embodiment of the present application:
the first method is as follows: in the embodiment of the application, the characters which cannot be associated with the visible font can be collected in advance and defined as the first type blank characters. And simultaneously, setting a code point association table, wherein the code point association table is associated with the original code points of the first type of blank characters and the corresponding self-defined code points, and setting the corresponding visible font for the self-defined code points in the replaced font.
Before the replacing font is called, whether each character in the character string is a first type blank character is judged. If any character in the character string is the first type blank character, obtaining a self-defined code point corresponding to the character from a preset code point association table, and replacing the code point at the position of the character with the self-defined code point. Therefore, after the replacing font is called, the character of the first type of blank character in the character string can be visualized through the self-defined code point.
Furthermore, in the first mode, for blank characters (such as BP, NBSP, etc.) that can be associated with a visible glyph, a corresponding visible alternative glyph is still set in the alternative font, so that the blank characters can be visualized after the alternative font is called.
It should be noted that the custom code points described in the embodiments of the present application may be implemented by using free code points in a code point library (e.g., code points in a Unicode private reserved area). It should be understood that in practical applications, such as a browser, blank characters may constitute word boundaries. When a mouse is double-clicked in a Word, the Word is selected, and the codepoint in the Unicode private area does not have the Unicode Word attribute, so that the codepoint in the Unicode private area is used as a self-defined codepoint, and the function can be reserved. In addition, code points in the Unicode private area belong to non-universal undefined code points, so that code points occupying other normal characters can be avoided, and the function confusion of the existing code points is avoided.
The second method comprises the following steps: in this possible embodiment, a code point association table may be established, in which the original code points and the corresponding custom code points of each type of blank character are associated, and the corresponding visible fonts are set in the replacement fonts for the custom code points.
Before the replacing font is called, each blank character in the character string is obtained, the self-defined code point corresponding to each blank character is obtained from the preset code point association table, and the code point at the position of each blank character is replaced by the corresponding self-defined code point. Therefore, after the replacing font is called, the blank characters in the character string are visualized through the self-defined code points.
It should be noted that, in the first and second manners, the format operation function identical to the corresponding blank character may be preset in the character corresponding to the self-defined code point in order that the character string containing the blank character still has the original typesetting layout function after the replacement font is called and the character string containing the blank character is displayed according to the replacement font. For example, for the self-defined code point corresponding to the TAB character, the visible substitute font of the corresponding self-defined code point can be preset to 4 times of the standard character width, so that after the self-defined code point is used for replacing the original code point of the TAB character for display, the effect of fixedly reserving a blank space with 4 times of the character width can be realized, and the function of realizing the TAB character is simulated approximately. For another example, for a blank character with a line feed function, such as VT, CR, LF, CRLF, etc., a < br/> element may be inserted after its corresponding custom code point.
The third method comprises the following steps: in the embodiment of the application, the characters which are collected and not associated with the visible font can be defined as the first type of blank characters in advance. And simultaneously, setting a code point association table, wherein the code point association table is associated with the original code points of the first type of blank characters and the corresponding self-defined code points, and setting the corresponding visible font for the self-defined code points in the replaced font.
Before the replacing font is called, whether each character in the character string is a first type blank character is judged. If any character in the character string is the first type blank character, obtaining a self-defined code point corresponding to the character from a preset code point association table, and inserting the corresponding self-defined code point at the position of the character before the position of the character. In this way, after the alternative font is called, although the character of the first type of blank character in the character string is still displayed in a blank mode, since the corresponding self-defined code point is inserted into the position of the previous character of the character, and the self-defined code point is displayed in a visible alternative font, the visualization is also realized.
Furthermore, in the third method, for blank characters (such as BP, NBSP, etc.) that can be associated with a visible glyph, a corresponding visible alternative glyph is still set in the alternative font, so that the blank characters can be visualized after the alternative font is called.
The method is as follows: in this possible embodiment, a code point association table may be established, in which the original code points and the corresponding custom code points of each type of blank character are associated, and the corresponding visible fonts are set in the replacement fonts for the custom code points.
Before the replacing font is called, each blank character in the character string is obtained, the self-defined code point corresponding to each blank character is obtained from the preset code point association table, and the corresponding self-defined code point is inserted into the position of the character before the position of the character. In this way, after the replacement font is called, the blank characters in the character string are visualized through the self-defined code points inserted in the front.
It should be noted that, in the third and fourth modes, the character width corresponding to the custom code point may be set to zero in advance in order to reduce the influence of the inserted custom code point on the display effect. In this way, the visible character corresponding to the self-defined code point is overlapped with the blank character positioned behind the visible character corresponding to the self-defined code point in the spatial position, and because the blank character does not display the content, only the visible character corresponding to the self-defined code point can be seen in the position of the blank character, so that when the character corresponding to the self-defined code point is inserted into the character string, the original format of the character string can not be influenced while the corresponding visible font is displayed.
It should be noted that, in the third and fourth modes, in order to avoid the situation that the user inserts content between the visible alternative font and the blank character, which results in the alternative font being displayed on the inserted content, but not on the blank character, in the third and fourth modes, the original code point of the blank character and the custom code point before the original code point is inserted may be set to be integrated, so as to avoid the situation that the inserted content may be between the custom code point and the original code point of the blank character.
In the embodiment of the present application, the visible alternative fonts for the types of blank characters included in the replaced font may refer to the corresponding relationship between the type of blank character and the visible alternative fonts shown in fig. 3, and after the replaced font is called, the visible alternative fonts may be displayed according to the corresponding relationship shown in fig. 3, for example, the blank characters of the NBSP type may be displayed by using the alternative fonts at "°".
It should be understood that, in the present character display technology, in order to ensure that a character can be effectively displayed, multiple sets of fonts are often configured for character display, and the multiple sets of fonts have priority among each other. When a character is displayed, the font with the first priority is preferentially selected to display the character, and when a certain character is not defined by the font with the first priority, the font with the second priority is adopted to display the character.
In the embodiment of the application, only visible alternative glyphs of blank characters of various types can be configured in the alternative fonts, and for non-blank characters, corresponding glyphs do not need to be set. Therefore, after the replacing font is called, the replacing font is used as the font of the first priority, and the originally used font is changed into the font of the second priority, so that the display font of the non-blank character is not changed after the replacing font is called, the non-blank character is still displayed according to the original font, the change of the display effect is smaller, and the display effect after the blank character is displayed is more in line with the actual use habit of a user.
It is to be noted that, in the embodiment of the present application, after the blank characters are visually displayed, when a normal font display instruction is received, the substitute corresponding to each displayed blank character may be replaced with the blank style for display.
For example, the font used originally may be called, and the font used originally is used as the font with the first priority to display the characters in the character string, so as to achieve an effect of displaying the blank characters in a blank pattern (in this manner, the blank pattern font of the custom code point corresponding to each blank character needs to be set in the font used originally).
In addition, a replacing font blank display version can be defined, after the original used font is called, the original used font is taken as the font with the first priority, the replacing font blank display version is taken as the font with the second priority, as the original used font does not define the font of the self-defining code point, the font with the second priority is adopted for displaying the self-defining code point, the font with the second priority is the replacing font blank display version, and the font of each self-defining code point in the version is the blank font. Thus, when a normal font display instruction is received, the effect of displaying blank characters in a blank mode can be achieved.
It should be understood that, in the embodiment of the present application, a corresponding normal font display interface may be provided in the display interface of the application program that uses the embodiment of the present application, so that a user may implement issuing a normal font display instruction by triggering the normal font display interface. It should be noted that the normal font display interface can be multiplexed with the blank character display interface, that is, the issue of the two commands is realized through one interface. Specifically, it may be detected in which font the current page is displayed when the multiplexed interface is triggered, and when the current page is displayed according to the normal font, it may be determined that a blank character display instruction is triggered, and when the current page is displayed according to the alternative font, it may be determined that a normal font display instruction is triggered.
In summary, the blank character visualization method provided by the embodiment of the application can enable the blank characters in the character string to be displayed in the visible substitution font, and enable relevant personnel to effectively distinguish which kind of blank characters the blank characters in the character string are specifically according to the displayed visible substitution font, thereby avoiding the situations of editing/translation errors and the like to a certain extent.
Example two:
in this embodiment, on the basis of the first embodiment, a process of implementing blank character visualization in a browser is taken as an example to further illustrate the present application.
First, an alternate font is defined in the browser.
In the alternative fonts, for SP and NBSP, original code points are reserved, and new visible fonts (namely visible alternative fonts) are designed; for TAB, CRLF, CR, LF and VT, using the code points of the Unicode private reserved area to allocate corresponding code points for the characters, and respectively designing corresponding visible glyphs (namely visible substitution glyphs).
And adding a switching button in a display interface of the browser for a user to switch a blank character display mode. The browser can set the style of the editor to be a corresponding style (namely, a style displayed by a normal font or a style displayed by a user-defined alternative font) according to the display mode selected by the user.
In the embodiment of the application, the normal font is the default font used by the system, and the self-defined alternative font only contains the self-defined visible alternative fonts corresponding to various blank characters.
When the application is carried out, the user can trigger the switching of the display style through the switching button. Because the blank characters correspond to blanks in the normal font and correspond to self-defined visible substitute glyphs in the substitute font, when the user selects the normal font, the blank characters are displayed as blanks; when the user selects an alternate font, the blank character displays the corresponding visible alternate glyph.
Specifically, assuming that the current page includes two blank characters, namely NBSP and CRLF, after the user triggers the switching of the display style through the switching button, the browser first determines the self-defined code point corresponding to CRLF, replaces the code point at the position of CRLF with the self-defined code point corresponding to CRLF, and then adds the < div > or < br > element. The replacement font is invoked and NBSP and CRLF are displayed with the visible replacement glyphs in the replacement font.
For example, as shown in fig. 4, fig. 4 is a comparison graph of the normal font display and the alternate font display (note that in fig. 4, a blank character CRLF is located after a comma of an english-chinese sentence; a blank character NBSP is located between two words of an english phrase "how to").
In text input, two visual input modes of blank characters are provided in the example of the application:
1. button mode:
several small buttons can be placed in the browser to correspond to various blank characters. When the user presses down, the browser inserts a corresponding alternative font at the insertion point to realize the display of the blank characters.
2. Shortcut key mode:
shortcut keys can be allocated to various blank characters, such as Ctrl + Enter for CRLF, Shift + Enter for LF, and the like. The browser monitors the keyboard events, so that after the shortcut keys are captured, the corresponding alternative fonts are inserted into the insertion points to display the blank characters.
By the scheme, the blank character visualization is realized, related personnel can effectively distinguish which kind of blank character the edited blank character is according to the displayed visible substitute font, and the situations of editing/translation errors and the like are avoided to a certain extent.
Example three:
based on the same inventive concept, the embodiment of the present application further provides a blank character visualization apparatus 100 in an online text display system. Referring to fig. 5, fig. 5 shows a blank character visualization apparatus corresponding to the method shown in fig. 1. It should be understood that the specific functions of the apparatus 100 can be referred to the above description, and the detailed description is omitted here as appropriate to avoid redundancy. The device 100 includes at least one software functional module that can be stored in memory in the form of software or firmware or solidified in the operating system of the device 100. Specifically, the method comprises the following steps:
referring to fig. 5, the apparatus 100 includes: a calling module 101 and a display processing module 102;
a calling module 101, configured to call a replacement font;
and the display processing module 102 is configured to display the character string including the blank character according to a replacement font, where the replacement font includes visible replacement glyphs for each type of blank character.
In a feasible implementation manner of the embodiment of the present application, a non-blank character in the replacement font is not provided with a corresponding font, so that when a character in the character string does not have a corresponding font in the replacement font, the corresponding font in the original font is displayed.
In a feasible implementation manner of the embodiment of the application, in an online translation system, any character has a unique corresponding code point; the display processing module 102 is specifically configured to obtain a current code point corresponding to each character in the character string; and displaying each character in the character string as a corresponding font of the current code point in the replacement font.
Referring to fig. 6, in a possible example of the above possible implementation, the apparatus 100 further includes a determining module 103 and a code point control module 104. The judging module 103 is configured to judge whether each character in the character string is a first type of blank character before the calling module 101 calls the replacement font, where the first type of blank character is a character of an unassociated visible font, and the code point control module 104 is configured to, if any character in the character string is a first type of blank character, obtain a custom code point corresponding to the character from a preset code point association table, and replace the code point at the position of the character with the custom code point, where the custom code point is provided with a corresponding visible font in the replacement font, and the custom code point is a free code point in the code point library.
In the above feasible example, the characters corresponding to the custom code point are preset with the same format operation function as the corresponding blank characters.
In another possible example of the foregoing possible implementation, still referring to fig. 6, the determining module 103 is configured to determine whether each character in the character string is a first type blank character before the calling module 101 calls the replacement font, where the first type blank character is a character that is not associable with a visible font, and the code point control module 104 is configured to, if any character in the character string is the first type blank character, obtain a custom code point corresponding to the character from a preset code point association table, and insert a custom code point in a position of a previous character to the position of the character, where the custom code point is provided with a corresponding visible font in the replacement font, and the custom code point is a free code point in the code point library.
In the above feasible example, the width of the character corresponding to the custom code point is zero, so that when the character corresponding to the custom code point is inserted into the character string, the original format of the character string is not affected while the corresponding visible font is displayed.
It should be understood that, for the sake of brevity, the contents described in some embodiments are not repeated in this embodiment.
Example four:
the present embodiment provides an electronic device, which is shown in fig. 7 and includes a processor 701, a memory 702, and a communication bus 703. Wherein:
the communication bus 703 is used for connecting communication between the processor 701 and the memory 702.
The processor 701 is configured to execute one or more programs stored in the memory 702 to implement the blank character visualization method in the first embodiment.
It will be appreciated that the configuration shown in fig. 7 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 7 or have a different configuration than shown in fig. 7. For example, the electronic device also has components such as a display screen, a keyboard, and the like.
The present embodiment also provides a readable storage medium, such as a floppy disk, an optical disk, a hard disk, a flash memory, a usb (secure digital memory Card), an MMC (Multimedia Card), etc., in which one or more programs for implementing the above steps are stored, and the one or more programs can be executed by one or more processors to implement the method for visualizing the blank characters in the first embodiment. And will not be described in detail herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
In this context, a plurality means two or more.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method for whitespace character visualization in an online text display system, comprising:
calling the replacing font;
and displaying the character string containing the blank characters according to the replacing font, wherein the replacing font comprises visible replacing fonts of various types of blank characters.
2. The method for visualizing the blank character of claim 1, wherein the non-blank character in the replacement font has no corresponding font, so that when the character in the character string has no corresponding font in the replacement font, the corresponding font in the original font is displayed.
3. The method for visualizing the blank character according to claim 1, wherein in the online translation system, any character has a unique corresponding codepoint; the displaying the character string containing the blank character according to the replacing font comprises:
acquiring a current code point corresponding to each character in the character string;
and displaying each character in the character string as a font corresponding to the current code point in the alternative font.
4. The whitespace character visualization method of claim 3, wherein prior to said invoking an alternate font, the method further comprises:
judging whether each character in the character string is a first type blank character, wherein the first type blank character is a character which can not be associated with a visible font;
if any character in the character string is the first type blank character, obtaining a self-defined code point corresponding to the character from a preset code point association table, and replacing the code point at the position of the character with the self-defined code point, wherein the self-defined code point is provided with a corresponding visible font in the replaced font, and the self-defined code point is a free code point in a code point library.
5. The method for visualizing the space character as in claim 4, wherein the character corresponding to the custom code point is preset with the same format operation function as the corresponding space character.
6. The whitespace character visualization method of claim 3, wherein prior to said invoking an alternate font, the method further comprises:
judging whether each character in the character string is a first type blank character;
if any character in the character string is the first type blank character, obtaining a self-defined code point corresponding to the character from a preset code point association table, and inserting the self-defined code point at the position of the character before the position, wherein the self-defined code point is provided with a corresponding visible font in the replaced font, and the self-defined code point is a free code point in a code point library.
7. The method for visualizing the blank character according to claim 6, wherein the width of the character corresponding to the custom code point is zero, so that when the character corresponding to the custom code point is inserted into the character string, the original format of the character string is not affected while the corresponding visible font is displayed.
8. An apparatus for visualizing whitespace characters in an online text display system, comprising: the system comprises a calling module and a display processing module;
the calling module is used for calling the replacing font;
and the display processing module is used for displaying the character string containing the blank characters according to the replacing font, wherein the replacing font comprises the visible replacing font of each type of blank characters.
9. An electronic device comprising a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the whitespace character visualization method of any of claims 1-7.
10. A readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the whitespace character visualization method as recited in any one of claims 1-7.
CN201911402053.5A 2019-12-30 2019-12-30 Blank character visualization method and device in online text display system Active CN111144073B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911402053.5A CN111144073B (en) 2019-12-30 2019-12-30 Blank character visualization method and device in online text display system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911402053.5A CN111144073B (en) 2019-12-30 2019-12-30 Blank character visualization method and device in online text display system

Publications (2)

Publication Number Publication Date
CN111144073A true CN111144073A (en) 2020-05-12
CN111144073B CN111144073B (en) 2021-11-16

Family

ID=70522243

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911402053.5A Active CN111144073B (en) 2019-12-30 2019-12-30 Blank character visualization method and device in online text display system

Country Status (1)

Country Link
CN (1) CN111144073B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1335966A (en) * 1999-06-15 2002-02-13 皇家菲利浦电子有限公司 Invisible encoding of attribute data in character based documents and files
US20030222916A1 (en) * 2002-05-28 2003-12-04 Katie Kuwata Object-oriented processing of tab text
CN101477441A (en) * 2009-01-21 2009-07-08 上海闻泰电子科技有限公司 Method for displaying and inputting symbol in mobile terminal
CN101561800A (en) * 2009-05-15 2009-10-21 内蒙古蒙科立软件有限责任公司 Character pattern generation method of Mongolian
CN101884039A (en) * 2007-09-28 2010-11-10 启动系统公司 Method and system for associating data records in multiple languages
CN102937881A (en) * 2012-11-30 2013-02-20 北京奇虎科技有限公司 Method for displaying input text in interface and interface component for displaying input text
US20140115519A1 (en) * 2012-10-22 2014-04-24 Yu Ouyang Space prediction for text input
US20150347356A1 (en) * 2014-05-30 2015-12-03 Apple Inc. Dynamic Text Layout Rules
JP2016192174A (en) * 2015-03-31 2016-11-10 京セラドキュメントソリューションズ株式会社 Image forming apparatus and report output system
US20170031868A1 (en) * 2015-08-02 2017-02-02 Apple Inc. Automatically Dividing Text Into Multiple Columns
CN106687889A (en) * 2014-09-05 2017-05-17 微软技术许可有限责任公司 Display-efficient text entry and editing
CN107133204A (en) * 2017-04-19 2017-09-05 福建江夏学院 A kind of terminal shortcut input method
CN108052491A (en) * 2017-11-22 2018-05-18 李晓妮 A kind of automatic processing method and device of certificate document
CN109933751A (en) * 2019-03-20 2019-06-25 腾讯科技(深圳)有限公司 Graphic rendering method, apparatus, computer readable storage medium and computer equipment
CN109978972A (en) * 2019-03-20 2019-07-05 珠海天燕科技有限公司 A kind of method and device of copy editor in picture

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1335966A (en) * 1999-06-15 2002-02-13 皇家菲利浦电子有限公司 Invisible encoding of attribute data in character based documents and files
US20030222916A1 (en) * 2002-05-28 2003-12-04 Katie Kuwata Object-oriented processing of tab text
CN101884039A (en) * 2007-09-28 2010-11-10 启动系统公司 Method and system for associating data records in multiple languages
CN101477441A (en) * 2009-01-21 2009-07-08 上海闻泰电子科技有限公司 Method for displaying and inputting symbol in mobile terminal
CN101561800A (en) * 2009-05-15 2009-10-21 内蒙古蒙科立软件有限责任公司 Character pattern generation method of Mongolian
US20140115519A1 (en) * 2012-10-22 2014-04-24 Yu Ouyang Space prediction for text input
CN102937881A (en) * 2012-11-30 2013-02-20 北京奇虎科技有限公司 Method for displaying input text in interface and interface component for displaying input text
US20150347356A1 (en) * 2014-05-30 2015-12-03 Apple Inc. Dynamic Text Layout Rules
CN106687889A (en) * 2014-09-05 2017-05-17 微软技术许可有限责任公司 Display-efficient text entry and editing
JP2016192174A (en) * 2015-03-31 2016-11-10 京セラドキュメントソリューションズ株式会社 Image forming apparatus and report output system
US20170031868A1 (en) * 2015-08-02 2017-02-02 Apple Inc. Automatically Dividing Text Into Multiple Columns
CN107133204A (en) * 2017-04-19 2017-09-05 福建江夏学院 A kind of terminal shortcut input method
CN108052491A (en) * 2017-11-22 2018-05-18 李晓妮 A kind of automatic processing method and device of certificate document
CN109933751A (en) * 2019-03-20 2019-06-25 腾讯科技(深圳)有限公司 Graphic rendering method, apparatus, computer readable storage medium and computer equipment
CN109978972A (en) * 2019-03-20 2019-07-05 珠海天燕科技有限公司 A kind of method and device of copy editor in picture

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
凉凉看社会: "【word】如何使word文档显示出空格符号?_百度知道", 《HTTPS://ZHIDAO.BAIDU.COM/QUESTION/1046771477248337579.HTML》 *

Also Published As

Publication number Publication date
CN111144073B (en) 2021-11-16

Similar Documents

Publication Publication Date Title
US8140969B2 (en) Displaying synchronously documents to a user
CA2937702C (en) Emphasizing a portion of the visible content elements of a markup language document
EP0325316B1 (en) A publishing system and method of use therein
US8640024B2 (en) Visually distinct text formatting
CN108595445A (en) Interpretation method, device and terminal
WO2020048326A1 (en) Interface display method and system, and terminal device
CN111767563A (en) Method, device, terminal and storage medium for setting authority of online document
CN105511792A (en) In-position hand input method and system for form
JPH0352098B2 (en)
CN108389244B (en) Implementation method for rendering flash rich text according to specified character rules
US20180018315A1 (en) Information processing device, program, and information processing method
JP2003308310A (en) Display method, display, display program, and recording medium recorded with display program
CN110598188A (en) Method and device for displaying annotations and computer-readable storage medium
CN111144073B (en) Blank character visualization method and device in online text display system
CN104572593A (en) Method, system and electronic device for processing letters
CN101542585A (en) Image generation system, projector, program, information storage medium, and image generation method
US20140215324A1 (en) Computerized method and computer program for displaying and printing markup
CN105320405A (en) Icon display method and terminal
US8504916B2 (en) Managing presentation and storing of multi-language fonts
JP2007305154A (en) Method, device, program, and program medium for display control
JP5645481B2 (en) Apparatus, method, and program
JP2006053741A (en) Tag information processing method, tag information processing system, and tag information processing program
CN111523288B (en) Display method and device for aerial view of PDF document
JP2005250690A (en) Information display system, information display device and identification information allocation device
KR101522200B1 (en) Method and apparatus for dispalying electronic documents displaying calculation results in one or more calculation result region

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
GR01 Patent grant
GR01 Patent grant