Text typesetting method and device, electronic equipment and computer storage medium

By automatically adjusting the edge distance and text layout of the rectangular text display area, the complexity of manual adjustment in label text editing is solved, and a user-friendly text layout experience is achieved.

CN119203922APending Publication Date: 2024-12-27WUHAN JINGCHEN INTELLIGENT IDENTIFICATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411136610.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The prior art requires users to manually adjust the size and font of the text box when editing tag text, which is complex and affects the user experience.

Method used

Provide a text layout method, by receiving the user's text input operation in the rectangular text display area, automatically adjusting the edge distance and text layout method of the rectangular text display area, so that the text to be displayed is in the rectangular text display area, including adjusting the pair Edge distance, text position, and font size.

Benefits of technology

No manual adjustment required for users, simple operation, improving the convenience and user experience of text layout.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119203922A_ABST
    Figure CN119203922A_ABST
Patent Text Reader

Abstract

The invention relates to a text typesetting method and device, electronic equipment and a computer storage medium, and belongs to the technical field of label editing.The text typesetting method comprises the steps that text input operation of a user in a rectangular text display area is received, and a to-be-displayed text is displayed in the rectangular text display area; and adjusting the opposite side distance of the rectangular text display area and the character typesetting mode of the to-be-displayed text based on the text input operation, so that the to-be-displayed text is in the rectangular text display area when the adjusted rectangular text display area displays the to-be-displayed text. The user does not need to manually adjust the text, the operation is simple, the text typesetting is convenient and fast, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of tag editing technology, and in particular to a text typesetting method, device, electronic equipment and computer storage medium. Background Art

[0002] In daily publicity and promotion, displaying promotional content through labels is a very common way of publicity.

[0003] When editing the text of a label, based on the settings of the text box in the label, if the text entered by the user is too long, the text box will continue to grow horizontally or vertically, which will cause the text content to exceed the width and height limits of the label paper. When printing the label, the overflow content cannot be printed. When the text overflows, the user needs to manually adjust the size of the text box and adjust the text font and layout accordingly. The operation is complicated and affects the user experience.

[0004] It can be seen that when editing text in a label, the prior art requires the user to manually adjust the text box size, font and layout, which is complicated and affects the user experience. Summary of the invention

[0005] In view of this, it is necessary to provide a text typesetting method, device, electronic device and computer storage medium to solve the technical problem that when editing the text in the label in the prior art, the user needs to manually adjust the text box size, and manually adjust the font and typesetting, which is complicated to operate and affects the user experience.

[0006] In order to solve the above problem, the present invention provides a text typesetting method, comprising: Receiving a text input operation from a user in a rectangular text display area, and displaying the text to be displayed in the rectangular text display area; The distance between opposite sides of the rectangular text display area and the text layout of the text to be displayed are adjusted based on the text input operation, so that when the adjusted rectangular text display area displays the text to be displayed, the text to be displayed is within the rectangular text display area.

[0007] In a possible implementation, adjusting the distance between opposite sides of the rectangular text display area and the text typesetting method of the text to be displayed based on the text input operation, and sequentially typeset the text in the text to be displayed, includes: Based on the text input operation and the number of characters in the text to be displayed, the first side distance or the second side distance of the rectangular text display area is adjusted, and / or the display position and / or font size of the characters in the text to be displayed are adjusted.

[0008] In a possible implementation, adjusting the first opposite side distance or the second opposite side distance of the rectangular text display area based on the text input operation and the number of characters in the text to be displayed, and adjusting the display position and / or font size of the characters in the text to be displayed, includes: When the first distance between two opposite sides or the second distance between two opposite sides of the rectangular text display area is a fixed value, the second distance between two opposite sides or the first distance between two opposite sides of the rectangular text display area is adjusted accordingly based on the number of characters in the text to be displayed and the font size of the characters, and the display position of the position of the text to be displayed in the rectangular text display area and / or the font size of the characters are adjusted at the same time.

[0009] In one possible implementation, the method includes: When the first distance between two opposite sides or the second distance between two opposite sides of the rectangular text display area is a fixed value, when a manual line break operation is received, the fixed restriction of the first distance between two opposite sides or the second distance between two opposite sides of the rectangular text display area is released, and the second distance between two opposite sides or the first distance between two opposite sides of the rectangular text display area is adjusted to a fixed value.

[0010] In one possible implementation, the method includes: When the first pair of sides distance or the second pair of sides distance of the rectangular text display area is a fixed value, when the first pair of sides or the second pair of sides reaches the boundary of the label editable area, the first pair of sides distance and the second pair of sides distance are both adjusted to non-fixed values.

[0011] In a possible implementation manner, adjusting the display position of the characters in the text to be displayed and / or the font size of the characters includes: When the first and second distances of opposite sides of the rectangular text display area are both fixed values, the font size, text alignment, text line spacing of the text to be displayed and the display position of the text in the rectangular text display area are adjusted.

[0012] In a possible implementation, the first and second side distances of the rectangular text display area are both fixed values, including: The first distance between two opposite sides and the second distance between two opposite sides of the rectangular text display area are preset fixed values; or The first pair of side distances and the second pair of side distances of the rectangular text display area are adjusted to overlap with the label editable area.

[0013] The present invention also provides a text typesetting device, comprising: A text acquisition module, used to receive a text input operation of a user in a rectangular text display area, and display the text to be displayed in the rectangular text display area; The text layout module is used to adjust the opposite side distance of the rectangular text display area and the text layout method of the text to be displayed based on the text input operation, so that when the adjusted rectangular text display area displays the text to be displayed, the text to be displayed is within the rectangular text display area.

[0014] The present invention also provides an electronic device, comprising a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in any one of the above-mentioned text typesetting methods.

[0015] The present invention also provides a computer-readable storage medium for storing a computer-readable program or instruction, wherein the program or instruction, when executed by a processor, can implement the steps in any one of the above-mentioned text typesetting methods.

[0016] The beneficial effects of the present invention are as follows: the text typesetting method provided by the present invention displays the text to be displayed in a rectangular text display area based on the user's text input operation, and automatically adjusts the opposite side distance of the rectangular text display area and the text typesetting method of the text to be displayed, so that when the adjusted rectangular text display area displays the text to be displayed, the text to be displayed is within the rectangular text display area, and there is no need for manual adjustment by the user. The operation is simple, and the text typesetting is convenient and fast, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0018] FIG1 is a schematic diagram of a flow chart of a text typesetting method provided by the present invention; Figure 2 A schematic diagram of a rectangular text display area provided by an embodiment of the present invention; Figure 3 A schematic diagram of adjusting the width of a rectangular text display area provided by an embodiment of the present invention; Figure 4 A schematic diagram of adjusting the height of a rectangular text display area provided by an embodiment of the present invention; Figure 5 A schematic diagram of an automatic line-wrapping typesetting provided by an embodiment of the present invention; Figure 6A schematic diagram of adjusting the text font size provided by an embodiment of the present invention; Figure 7 A schematic diagram of adjusting the font size of a text is provided for an embodiment of the present invention; Figure 8 A structural schematic diagram of a text typesetting device provided by an embodiment of the present invention; Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0019] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of the present invention and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.

[0020] In the description of the embodiments of the present invention, unless otherwise specified, "multiple" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone.

[0021] The descriptions of "first", "second", etc. involved in the embodiments of the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the technical features defined as "first" and "second" may explicitly or implicitly include at least one of the features.

[0022] Reference to an "embodiment" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0023] A specific embodiment of the present invention, as Figure 1 As shown, a text typesetting method is disclosed, the method comprising: S101, receiving a text input operation of a user in a rectangular text display area, and displaying the text to be displayed in the rectangular text display area; S102, adjusting the distance between opposite sides of the rectangular text display area and the text layout of the text to be displayed based on the text input operation, so that when the adjusted rectangular text display area displays the text to be displayed, the text to be displayed is within the rectangular text display area.

[0024] In an embodiment of the present invention, a rectangular text display area refers to an area in a label for displaying text. The text display area is set to a rectangle and is used to display the text content of the text to be displayed. The text to be displayed refers to the text content input by the user that needs to be displayed in the label. The text input operation can be a keyboard input operation, a handwriting input operation, and a voice input operation, etc. The user inputs the text content to be displayed in the rectangular text display area through the text input operation, and the rectangular text display area displays the text content.

[0025] Specifically, Figure 2 As shown, a rectangular text display area is set in the label editable area. The user starts editing the text to be displayed by double-clicking the rectangular text display area and inputs the text content to be displayed through the keyboard. As the user inputs text, the text content is displayed in the rectangular text display area.

[0026] In an embodiment of the present invention, when the text content input by the user exceeds the boundary of the rectangular text display area, the opposite side distance of the text display area and the text layout method of the text to be displayed can be adjusted so that when the adjusted rectangular text display area displays the text to be displayed, the text to be displayed is within the rectangular text display area. The adjustment of the rectangular text display area and the text layout method will be described in detail later in the present invention.

[0027] The text typesetting method provided by the present invention displays the text to be displayed in a rectangular text display area based on the text input operation of the user, and automatically adjusts the opposite side distance of the rectangular text display area and the text typesetting method of the text to be displayed, so that when the adjusted rectangular text display area displays the text to be displayed, the text to be displayed is within the rectangular text display area, and no manual adjustment by the user is required. The operation is simple, and the text typesetting is convenient and fast, thereby improving the user experience.

[0028] Optionally, adjusting the distance between opposite sides of the rectangular text display area and the text layout of the text to be displayed based on the text input operation, and sequentially layout the text in the text to be displayed, includes: Based on the text input operation and the number of characters in the text to be displayed, the first side distance or the second side distance of the rectangular text display area is adjusted, and / or the display position and / or the font size of the characters in the text to be displayed are adjusted.

[0029] In an embodiment of the present invention, the first opposite side distance and the second opposite side distance refer to the height and width, or the width and height, of a rectangular text display area, and the specific correspondence is related to the typeset direction of the rectangular text display area. When adjusting the opposite side distance of the rectangular text display area, it is necessary to select the first opposite side distance or the second opposite side distance to be adjusted in combination with the restriction of the opposite side distance of the rectangular text display area. For example, when the first opposite side distance is pre-set to a fixed value, in order to ensure that the text content of the text to be displayed does not overflow, the second opposite side distance can be adjusted. On the contrary, when the second opposite side distance is pre-set to a fixed value, the first opposite side distance can be adjusted; further, when the opposite side distance of the rectangular text display area cannot be adjusted, you can choose to adjust the text of the text to be displayed to ensure that the text of the text to be displayed is within the rectangular text display area.

[0030] Specifically, adjusting the first pair of side distances or the second pair of side distances of the rectangular text display area based on the text input operation and the number of characters in the text to be displayed, and adjusting the display position and / or font size of the characters in the text to be displayed include: When the first distance between two opposite sides or the second distance between two opposite sides of the rectangular text display area is a fixed value, the second distance between two opposite sides or the first distance between two opposite sides of the rectangular text display area is adjusted accordingly based on the number of characters in the text to be displayed and the font size of the characters, and at the same time, the display position of the position of the text to be displayed in the rectangular text display area and / or the font size of the characters are adjusted.

[0031] In an embodiment of the present invention, the rectangular text display area is pre-set with an adjustment mode. For example, the first opposite side distance is the height and the second opposite side distance is the width. Before the text editing starts, the rectangular text display area can be set to a fixed height mode, that is, the height of the rectangular text display area remains unchanged. At this time, the typesetting method of the characters in the text to be displayed is to be arranged from left to right in sequence. As the number of characters input by the user increases, in order to ensure that all characters are within the rectangular text display area, the width value of the rectangular text display area needs to be increased; Figure 3 As shown in , the height of the rectangular text display area is fixed to the height of one character. As the user inputs more text, the height of the rectangular text display area remains unchanged while its width increases to accommodate more text. Similarly, Figure 4 As shown, when the width of the rectangular text display area is a fixed value, the height of the rectangular text display area can be adjusted. The above adjustments are for horizontally typesetting text formats. When the text format is vertically typesetting, the width and height can be swapped.

[0032] Optionally, when a certain distance between opposite sides of the rectangular text display area is adjusted, the position of the characters in the text to be displayed in the rectangular text display area needs to be adjusted accordingly, so that the text to be displayed fits the rectangular text display area.

[0033] Furthermore, when the distance between opposite sides of the rectangular text display area cannot be adjusted, the font size of the characters in the text to be displayed can be adjusted, such as reducing the font size of the text to ensure that all characters in the text to be displayed are within the rectangular text display area.

[0034] The embodiment of the present invention can automatically adapt the text to be displayed and the rectangular text display area by adjusting the opposite side distance, the font and the typesetting method of the text according to the number of characters input by the user, without the need for manual operation by the user.

[0035] Furthermore, the text typesetting method also includes: When the first distance between two opposite sides or the second distance between two opposite sides of the rectangular text display area is a fixed value, when a manual line break operation is received, the fixed restriction of the first distance between two opposite sides or the second distance between two opposite sides of the rectangular text display area is released, and the second distance between two opposite sides or the first distance between two opposite sides of the rectangular text display area is adjusted to a fixed value.

[0036] In an embodiment of the present invention, a rectangular text display area can be divided into three display modes, a fixed height mode, a fixed width mode, and a fixed width and height mode. For example, for a rectangular text display area with horizontal layout, when it is initially set to a fixed height mode, if the user manually enters a line break operation when entering text content, it means that the user needs to limit the width of the rectangular text display area, and the height of the rectangular text display area is no longer restricted. Therefore, the restriction on the height of the rectangular text display area can be lifted, and the width of the rectangular text display area can be set to the distance value between the initial position of the text content entered by the user and the line break position. Optionally, for a rectangular text display area with vertical layout, when the user enters text content, the text will be arranged from top to bottom. When the width of the rectangular text display area is a fixed value in the initial setting set, if the user enters a line break operation, the width of the rectangular text display area is adjusted accordingly to a fixed value, and the height of the rectangular text display area is determined to be a fixed value.

[0037] The embodiment of the present invention provides a solution for automatically adjusting the side distance restriction mode of a rectangular text display area based on user operation, which can automatically adjust the display mode of the rectangular text display area based on user operation to adapt to the text to be displayed, and the operation is more intelligent.

[0038] Optionally, the text layout method further includes: When the first pair of sides distance or the second pair of sides distance of the rectangular text display area is a fixed value, when the first pair of sides or the second pair of sides reaches the boundary of the label editable area, the first pair of sides distance and the second pair of sides distance are both adjusted to non-fixed values.

[0039] In the embodiment of the present invention, the label editable area is an area for editing text set within the real-time label range, and the rectangular text display area should be within the label editable area. Continuing from the above embodiment, when the first opposite side distance or the second opposite side distance of the rectangular text display area is adjusted, when a certain opposite side distance reaches the boundary of the label editable area, it means that the opposite side distance cannot be increased any further, and the other opposite side distance needs to be increased to ensure that all the text to be displayed is within the rectangular text display area. For example, Figure 5 As shown, the rectangular text display area is in a fixed height mode. When the width of the rectangular text display area is increased based on the user's text input operation, the width of the rectangular text display area reaches the boundary of the label editable area. The width of the rectangular text display area cannot be increased further, so the height of the rectangular text display area needs to be increased. At this time, the width of the rectangular text display area is the width of the label editable area, and the height of the rectangular text display area is adjusted according to the number of characters in the text to be displayed. Correspondingly, if the width of the rectangular text display area is a fixed value, when adjusting the height of the rectangular text display area to coincide with the boundary of the label editable area, the width of the rectangular text display area needs to be increased to ensure that all the text content of the text to be displayed is within the rectangular text display area.

[0040] An embodiment of the present invention provides a method for adjusting the distance between opposite sides of a rectangular text display area, which can automatically adjust another opposite side of the rectangular text display area to adapt to the text to be displayed when one opposite side of the rectangular text display area reaches the boundary of the label editable area.

[0041] Optionally, adjusting the display position of the text to be displayed and / or the font size of the text includes: When the first and second side distances of the rectangular text display area are both fixed values, the font size, text alignment, text line spacing, and text display position of the text to be displayed in the rectangular text display area are adjusted.

[0042] In an embodiment of the present invention, when adjusting the text of the text to be displayed, if the two sets of opposite side distances of the rectangular text display area cannot be adjusted, it is necessary to adjust the font size, text alignment, text line spacing and display position of the text in the text to be displayed in the rectangular text display area to ensure that all the text in the text to be displayed can be displayed in the rectangular text display area.

[0043] Optionally, the first distance between two opposite sides and the second distance between two opposite sides of the rectangular text display area are both fixed values, including: the first distance between two opposite sides and the second distance between two opposite sides of the rectangular text display area are preset fixed values; or the first distance between two opposite sides and the second distance between two opposite sides of the rectangular text display area are adjusted to overlap with the editable area of ​​the label.

[0044] In the embodiment of the present invention, there are two situations where the distances between the two opposite sides of the rectangular text display area cannot be adjusted, such as Figure 6 As shown in the figure, the first one is that when the text editing starts, the two sets of opposite side distances of the rectangular text display area are set to fixed values, that is, the rectangular text display area is in a fixed width and height mode. At this time, when the user inputs too much text, because the opposite side distance of the rectangular text display area cannot be adjusted, it is necessary to adjust the font size of the text to be displayed, the text line spacing and the display position of the text in the rectangular text display area; Figure 7 As shown in the figure, the second is that after adjusting the distance between opposite sides in the rectangular text display area, the border of the rectangular text display area overlaps with the editable area of ​​the label. At this time, it is impossible to continue to increase the distance between opposite sides in the rectangular text display area. In this case, it is necessary to adjust the font size of the text to be displayed, the text line spacing, and the display position of the text in the rectangular text display area. In addition, the alignment of the text can also be adjusted, such as left alignment, right alignment, top alignment, bottom alignment, etc.

[0045] The embodiment of the present invention automatically adjusts the font size, text line spacing and text display position of the text to be displayed in the rectangular text display area when the distance between opposite sides of the rectangular text display area cannot be adjusted, thereby ensuring that all the text to be displayed is within the rectangular text display area.

[0046] In order to better implement the text typesetting method in the embodiment of the present invention, based on the text typesetting method, correspondingly, Figure 8 As shown, the embodiment of the present invention further provides a text typesetting device, and the text typesetting device 800 includes: The text acquisition module 801 is used to receive the text input operation of the user in the rectangular text display area, and display the text to be displayed in the rectangular text display area; The text layout module 802 is used to adjust the distance between opposite sides of the rectangular text display area and the text layout of the text to be displayed based on the text input operation, so that when the adjusted rectangular text display area displays the text to be displayed, the text to be displayed is within the rectangular text display area.

[0047] The text typesetting device 800 provided in the above embodiment can implement the technical solution described in the above text typesetting method embodiment. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above text typesetting method embodiment, which will not be repeated here.

[0048] The text typesetting device provided by the present invention displays the text to be displayed in a rectangular text display area based on the user's text input operation, and automatically adjusts the opposite side distance of the rectangular text display area and the text typesetting method of the text to be displayed, so that when the adjusted rectangular text display area displays the text to be displayed, the text to be displayed is within the rectangular text display area, and there is no need for manual adjustment by the user. The operation is simple, and text typesetting is convenient and fast, thereby improving the user experience.

[0049] like Fig. 9 As shown, the present invention also provides an electronic device 900. The electronic device 900 includes a processor 901, a memory 902 and a display 903. Fig. 9 Only some components of the electronic device 900 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0050] In some embodiments, the processor 901 may be a central processing unit (CPU), a microprocessor or other data processing chip, and is used to run program codes or process data stored in the memory 902, such as the text typesetting method of the present invention.

[0051] In some embodiments, the processor 901 may be a single server or a server group. The server group may be centralized or distributed. In some embodiments, the processor 901 may be local or remote. In some embodiments, the processor 901 may be implemented in a cloud platform. In one embodiment, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multi-cloud, etc., or any combination thereof.

[0052] In some embodiments, the memory 902 may be an internal storage unit of the electronic device 900, such as a hard disk or memory of the electronic device 900. In other embodiments, the memory 902 may also be an external storage device of the electronic device 900, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device 900.

[0053] Furthermore, the memory 902 may include both an internal storage unit of the electronic device 900 and an external storage device. The memory 902 is used to store application software installed in the electronic device 900 and various data.

[0054] In some embodiments, the display 903 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 903 is used to display information of the electronic device 900 and to display a visual user interface. The components 901-903 of the electronic device 900 communicate with each other through a system bus.

[0055] In some embodiments, when the processor 901 executes the text layout program in the memory 902, the following steps may be implemented: Receive a text input operation from a user in a rectangular text display area, and display the text to be displayed in the rectangular text display area; Based on the text input operation, the distance between opposite sides of the rectangular text display area and the text layout of the text to be displayed are adjusted so that when the adjusted rectangular text display area displays the text to be displayed, the text to be displayed is within the rectangular text display area.

[0056] It should be understood that: when the processor 901 executes the text typesetting program in the memory 902, in addition to the above functions, other functions can also be implemented. For details, please refer to the description of the corresponding method embodiment above.

[0057] Furthermore, the embodiment of the present invention does not specifically limit the type of the electronic device 900 mentioned, and the electronic device 900 may be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer, etc. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with IOS, Android, Microsoft or other operating systems. The above-mentioned portable electronic devices may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 900 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0058] Correspondingly, an embodiment of the present invention also provides a computer-readable storage medium, which is used to store computer-readable programs or instructions. When the program or instructions are executed by a processor, it can implement the steps or functions in the text typesetting method provided in the above-mentioned method embodiments.

[0059] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0060] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A text typesetting method, characterized in that: include: Receiving a text input operation from a user in a rectangular text display area, and displaying the text to be displayed in the rectangular text display area; Based on the text input operation, the distance between opposite sides of the rectangular text display area and the text typesetting method of the text to be displayed are adjusted, so that when the adjusted rectangular text display area displays the text to be displayed, the text to be displayed is within the rectangular text display area.

2. The text typesetting method according to claim 1, characterized in that: The adjusting the distance between opposite sides of the rectangular text display area and the text typesetting method of the text to be displayed based on the text input operation, and sequentially typeset the text in the text to be displayed, includes: Based on the text input operation and the number of characters in the text to be displayed, the first side distance or the second side distance of the rectangular text display area is adjusted, and / or the display position and / or font size of the characters in the text to be displayed are adjusted.

3. The text typesetting method according to claim 2, characterized in that: The adjusting the first side distance or the second side distance of the rectangular text display area based on the text input operation and the number of characters in the text to be displayed, and adjusting the display position and / or font size of the characters in the text to be displayed, includes: When the first distance between two opposite sides or the second distance between two opposite sides of the rectangular text display area is a fixed value, the second distance between two opposite sides or the first distance between two opposite sides of the rectangular text display area is adjusted accordingly based on the number of characters in the text to be displayed and the font size of the characters, and the display position of the position of the text to be displayed in the rectangular text display area and / or the font size of the characters are adjusted at the same time.

4. The text typesetting method according to claim 3, characterized in that: The method comprises: When the first distance between two opposite sides or the second distance between two opposite sides of the rectangular text display area is a fixed value, when a manual line break operation is received, the fixed restriction of the first distance between two opposite sides or the second distance between two opposite sides of the rectangular text display area is released, and the second distance between two opposite sides or the first distance between two opposite sides of the rectangular text display area is adjusted to a fixed value.

5. The text typesetting method according to claim 3, characterized in that: The method comprises: When the first pair of sides distance or the second pair of sides distance of the rectangular text display area is a fixed value, when the first pair of sides or the second pair of sides reaches the boundary of the label editable area, the first pair of sides distance and the second pair of sides distance are both adjusted to non-fixed values.

6. The text typesetting method according to claim 2, characterized in that: The adjusting the display position of the characters in the text to be displayed and / or the font size of the characters includes: When the first and second distances of opposite sides of the rectangular text display area are both fixed values, the font size, text alignment, text line spacing of the text to be displayed and the display position of the text in the rectangular text display area are adjusted.

7. The text typesetting method according to claim 6, characterized in that: The first and second side distances of the rectangular text display area are both fixed values, including: The first distance between two opposite sides and the second distance between two opposite sides of the rectangular text display area are preset fixed values; or The first pair of side distances and the second pair of side distances of the rectangular text display area are adjusted to overlap with the label editable area.

8. A text typesetting device, characterized in that: include: A text acquisition module, used to receive a text input operation of a user in a rectangular text display area, and display the text to be displayed in the rectangular text display area; The text layout module is used to adjust the opposite side distance of the rectangular text display area and the text layout method of the text to be displayed based on the text input operation, so that when the adjusted rectangular text display area displays the text to be displayed, the text to be displayed is within the rectangular text display area.

9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the text typesetting method described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps of the text typesetting method described in any one of claims 1 to 7.