Text processing method and device, electronic equipment and storage medium

By providing flexible text layout methods in video editing scenes, the problems of single effect and low matching caused by fixed typesetting methods in the prior art are solved, and diversified typesetting styles and higher video matching are achieved.

CN119598968APending Publication Date: 2025-03-11BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202311162507.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-08
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the prior art, the text layout method in the video editing scene is fixed, making it difficult to match the diverse video editing needs, resulting in a single layout effect and not matching the video content.

Method used

Provides a text processing method, which displays multiple typesetting paths in the text editing interface, including straight and curved paths, allowing users to flexibly adjust the layout style of text.

Benefits of technology

It realizes the diversified presentation of text layout styles, enriches the visualization effect of the text, meets the diverse video editing needs, and improves the video matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119598968A_ABST
    Figure CN119598968A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a text processing method and device, electronic equipment and a storage medium. The method comprises the steps that in response to a text adding triggering operation, an added to-be-processed text is displayed in a text editing interface through a first typesetting path, and the to-be-processed text comprises a plurality of text characters; in response to a character typesetting trigger operation input for the to-be-processed text, determining a to-be-typeset text corresponding to the to-be-processed text and a second typesetting path corresponding to the to-be-typeset text, the to-be-typeset text being a text composed of partial or all text characters in the to-be-processed text; the to-be-typeset text is displayed in the text editing interface through a second typesetting path, and the first typesetting path and / or the second typesetting path comprise at least one curve path. According to the technical scheme, the typesetting path of the to-be-processed text can be simply and conveniently adjusted, diversified presentation of the text typesetting style is achieved, and the visual effect of the text is enriched.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to computer application technology, and more particularly to a text processing method, device, electronic device, and storage medium. Background Art

[0002] In the video editing scene, adding text to the video to enrich the video effect is a method favored by users. In other words, in the video editing scene, text editing is a basic and important function, and in text editing, typesetting is a core function point.

[0003] In the related art, the layout of text in video editing scenes is often fixed, which makes the visualization effect presented by the text layout relatively simple. However, the content of videos is often diverse, and the expected matching text layout is also different. This fixed text layout method is often difficult to match the diverse video editing needs. Summary of the invention

[0004] The present disclosure provides a text processing method, device, electronic device and storage medium to achieve diversified typesetting effects of text.

[0005] In a first aspect, an embodiment of the present disclosure provides a text processing method, the method comprising:

[0006] In response to a text adding trigger operation, the added text to be processed is displayed in a text editing interface in a first typesetting path, wherein the text to be processed includes a plurality of text characters;

[0007] In response to a character typesetting trigger operation inputted for the text to be processed, determining a text to be typeset corresponding to the text to be processed and a second typesetting path corresponding to the text to be typeset, wherein the text to be typeset is a text composed of part or all of the text characters in the text to be processed;

[0008] The text to be typeset is displayed in the text editing interface along the second typeset path, wherein the first typeset path and / or the second typeset path includes at least one curved path.

[0009] In a second aspect, an embodiment of the present disclosure further provides a text processing device, the device comprising:

[0010] A text adding module, configured to display the added text to be processed in a first typesetting path in a text editing interface in response to a text adding triggering operation, wherein the text to be processed includes a plurality of text characters;

[0011] a typesetting trigger module, configured to determine, in response to a character typesetting trigger operation inputted for the text to be processed, a text to be typeset corresponding to the text to be processed and a second typesetting path corresponding to the text to be typeset, wherein the text to be typeset is a text composed of part or all of the text characters in the text to be processed;

[0012] A typesetting update module is used to display the text to be typeset in the text editing interface using the second typesetting path, wherein the first typesetting path and / or the second typesetting path includes at least one curved path.

[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0014] one or more processors;

[0015] a storage device for storing one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the text processing method as described in any one of the embodiments of the present disclosure.

[0017] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute a text processing method as described in any one of the embodiments of the present disclosure.

[0018] The technical solution of the disclosed embodiment provides a text adding function by displaying the added text to be processed in the text editing interface with the first typesetting path in response to a text adding trigger operation, and can present the typesetting effect of the text to be processed with the first typesetting path without making additional typesetting settings, thereby ensuring the display effect of the text to be processed after adding; then, by responding to the character typesetting trigger operation input for the text to be processed, the text to be typeset corresponding to the text to be processed and the second typesetting path corresponding to the text to be typeset are determined, so that the typesetting path that meets the user's needs can be accurately obtained through user operations, and part or all of the text characters in the text to be processed can be flexibly typeset; finally, by displaying the text to be typeset in the text editing interface with the second typesetting path, the typesetting effect after adjusting to the second typesetting path can be intuitively presented, and the first typesetting path and / or the second typesetting path may include one or more curved paths, thereby realizing the diversification of typesetting paths and providing users with more choices. It solves the technical problems of poor typesetting effect and low video matching caused by a single typesetting path. It can simply and conveniently adjust the typesetting path of the text to be processed, realize diversified presentation of text typesetting styles, and enrich the visualization effect of the text. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0020] Figure 1A A flowchart of a text processing method provided by an embodiment of the present disclosure;

[0021] Figure 1B A schematic diagram of a style of a straight line curve used as a first typesetting path in a text processing method provided by an embodiment of the present disclosure;

[0022] Figure 1C A schematic diagram of a style of a second typesetting path using a downwardly curved arc curve as a text processing method provided by an embodiment of the present disclosure;

[0023] Figure 1D A text processing method provided by an embodiment of the present disclosure adopts an upward curved arc curve as a style schematic diagram of a second typesetting path;

[0024] Figure 2 A flowchart of another text processing method provided by an embodiment of the present disclosure;

[0025] Figure 3 A flowchart of another text processing method provided by an embodiment of the present disclosure;

[0026] Figure 4 A structural schematic diagram of a text processing device provided by an embodiment of the present disclosure;

[0027] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0029] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0030] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0031] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0032] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0033] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0034] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0035] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0036] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0037] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0038] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0039] Figure 1A A flowchart of a text processing method provided in an embodiment of the present disclosure is provided. The embodiment of the present disclosure is applicable to the situation where an object is deleted and the object is restored after deletion. The method can be executed by a text processing device, which can be implemented in the form of software and / or hardware, and optionally, by an electronic device, which can be a mobile terminal, a PC or a server, etc.

[0040] like Figure 1A As shown, the method of this embodiment may specifically include:

[0041] S110. In response to a text adding trigger operation, displaying the added text to be processed in a text editing interface in a first typesetting path, wherein the text to be processed includes a plurality of text characters.

[0042] Among them, the text adding trigger operation can be understood as an operation for adding the text to be processed after being triggered. The typesetting path can be understood as the arrangement trajectory of multiple text characters in the text to be processed. The first typesetting path can be understood as the typesetting path adopted when adding the text to be processed, and can also be understood as the initial typesetting path of the text to be processed. Exemplarily, the first typesetting path can be the original default typesetting path, or it can be the default typesetting path adjusted based on the user operation, or it can be the typesetting path adopted by the user last time, etc. Text characters can be understood as the characters that make up the text to be processed. Optionally, the default typesetting path can be a linear path, for example, a linear path arranged in rows or columns. Text characters can be characters in any one or more language forms, and the content or language form of the characters is not limited here.

[0043] In the embodiments of the present disclosure, there are multiple ways to generate the text adding trigger operation. For example, in response to a control trigger operation acting on a text submission control, the text input in a preset text input control is obtained as the text to be added. For example, the text input control can be a text input box, a text writing area, or a text reading control.

[0044] Optionally, the added text to be processed is displayed in the first display area of ​​the text editing interface with the first layout path. Further, a text display effect setting control can be displayed in the second display area of ​​the text editing interface, which can be used to set the display effect of the text to be processed and support rich text settings.

[0045] As an optional embodiment of the present disclosure, a text action object, such as a picture or a video, is displayed in the text editing interface. In response to a text adding trigger operation inputted to the text object, the added text to be processed is displayed in a first typesetting path at a preset position of the text action object, wherein the preset position can be understood as a preset initial display position of the text to be processed in the text action object, for example, it can be the top, middle, bottom, or one-third of the distance from the top border of the text action object.

[0046] Specifically, in response to a text adding trigger operation, the text to be processed is obtained, the first typesetting path corresponding to the text to be processed is determined, and then the added text to be processed is displayed in the text editing interface with the first typesetting path. After determining the first typesetting path corresponding to the text to be processed, the text to be processed can also be parsed based on the first typesetting path to obtain text attribute information of the text to be processed. The text attribute information includes, but is not limited to, one or more of the font size corresponding to the text characters in the text to be processed, the character spacing between the text characters, the inclination angle corresponding to the text characters, and the style of the text characters (such as bold, color, shadow or glow, etc.).

[0047] It is understandable that, in the process of adding the text to be processed, the text attribute information corresponding to the text to be processed is associated with the input text editing operation. Therefore, in response to the text editing operation, the text attribute information of the text to be processed can be updated, and the display effect of the text to be processed under the first typesetting path can be updated based on the text attribute information.

[0048] S120: In response to a character typesetting triggering operation inputted for the text to be processed, determine a text to be typeset corresponding to the text to be processed and a second typesetting path corresponding to the text to be typeset.

[0049] Among them, the text to be typeset may be a text composed of some or all of the text characters in the text to be processed. In other words, the text to be processed may be typeset as a whole, or a local text in the text to be processed may be typeset. Some of the text characters in the text to be processed may be a plurality of text characters that are continuously arranged and / or discretely arranged in the text to be processed. The character typesetting trigger operation may be understood as an operation for re-typesetting the text to be typeset after being triggered. Since there are many ways to re-typeset the text to be typeset, the results presented are related to the display trajectory of the characters, and therefore, they can be distinguished by the typesetting path. In an embodiment of the present disclosure, after receiving a character typesetting trigger operation input for the text to be processed, the text to be typeset corresponding to the text to be processed may be determined, and the re-typesetting path corresponding to the text to be typeset, i.e., the second typesetting path, may be determined.

[0050] In an optional implementation of the disclosed embodiment, specifically, in response to a character selection trigger operation input for at least part of the text characters in the text to be processed, the text composed of the selected text characters is used as the text to be typeset; in response to a typesetting switching trigger operation input for the text to be typeset, the typesetting path after switching is determined, and the typesetting path after switching is used as the second typesetting path corresponding to the text to be typeset. By adopting this technical solution, firstly, the text characters to be rearranged can be accurately determined based on the character selection trigger operation, and the text characters are used as the processing units to achieve refined typesetting of the text to be processed. Then, the second typesetting path to be adopted can be accurately obtained based on the typesetting switching trigger operation, thereby achieving flexible switching of the typesetting path.

[0051] The character selection trigger operation can be understood as an operation for selecting or deselecting one or more text characters after being triggered. The layout switching trigger operation can be understood as an operation for re-layouting the processed text based on the triggered layout path after being triggered, or can be understood as an operation for switching the first layout path to the triggered second layout path. Exemplarily, the layout switching trigger operation can be a selection operation for the second layout path or an operation for switching the first layout path, etc.

[0052] In an embodiment of the present disclosure, the character selection trigger operation for at least part of the text characters input in the text to be processed may be a box selection operation for at least part of the text characters input in the text to be processed, and the text characters located in the box selection area are taken as the selected text characters; or, based on a cursor dragging operation, the text characters located between the start drag position and the end drag position of the cursor are taken as the selected text characters; or, based on adding a selection control and a selection operation for multiple continuous or discrete text characters input in the text to be processed, such as inputting a character selection operation while pressing the Ctrl key, etc.

[0053] Optionally, in response to the typesetting switch trigger operation, determining the typesetting path after switching includes: in the case where multiple typesetting path identifiers are displayed on the text editing interface, in response to an identifier selection operation for the typesetting path identifier, determining the preset typesetting path corresponding to the selected typesetting path identifier as the typesetting path after switching. Among them, the typesetting path identifier can be understood as identification information used by the user to identify different typesetting paths. Exemplarily, the typesetting path identifier can be an icon that displays an example of the typesetting effect of the typesetting path corresponding to it. By adopting this technical solution, multiple typesetting paths can be displayed separately, and accurate selection of the second typesetting path can be achieved.

[0054] Optionally, the determining of the switched layout path in response to the layout switching trigger operation includes: determining the switched layout path based on the first layout path and a preset switching rule in response to a control trigger operation acting on the layout switching control, wherein the preset switching rule is to randomly switch among multiple preset layout paths or to sequentially switch according to a preset switching order corresponding to multiple preset layout paths. The adoption of this technical solution supports users to quickly preview the layout effects corresponding to multiple layout paths, and the operation method is simple, which saves users time in searching for layout paths, and multiple layout path effects can be displayed by one-key switching.

[0055] In another optional implementation of the disclosed embodiment, in response to a character typesetting trigger operation inputted for the text to be processed, determining the text to be typeset corresponding to the text to be processed and the second typesetting path corresponding to the text to be typeset may include: displaying a text bounding box corresponding to the first typesetting path, and using the text to be processed located in the text bounding box as the text to be typeset; in response to a size adjustment trigger operation acting on the text bounding box, determining the second typesetting path corresponding to the text to be typeset based on the size information of the adjusted text bounding box. This technical solution can be used to achieve the effect of adjusting the typesetting path corresponding to the text to be typeset by adjusting the text bounding box. The operation is simple and convenient, and the typesetting path can be flexibly adjusted. The text to be typeset can be reasonably arranged in the text bounding box, thereby improving the text typesetting effect.

[0056] Among them, the text enclosing box can be understood as an enclosing box that surrounds at least part of the text characters of the text to be processed. In some scenarios, it can be a text selection box corresponding to the text to be processed. Optionally, the display of the text enclosing box corresponding to the first typesetting path includes: after detecting that the text to be processed added is displayed in the text editing interface with the first typesetting path, displaying a text enclosing box that surrounds all the text characters of the text to be processed; or, obtaining the selected text characters in the text to be processed, generating and displaying an enclosing box that surrounds the selected text characters as a text enclosing box.

[0057] In the embodiments of the present disclosure, the size adjustment trigger operation can be understood as an operation for adjusting the size of the text bounding box after being triggered. Exemplarily, the size adjustment trigger operation can be an operation for adjusting the size of the text bounding box in a preset direction, and / or an operation for proportionally scaling the size of the text bounding box. Wherein, in the case where the text bounding box is a symmetrical structure, the preset direction can be the direction of the parallel sides of the text bounding box, such as, in the case where the text bounding box is a rectangle, the preset direction can include the width direction and / or the height direction. In the case where the text bounding box is an asymmetrical structure, the size adjustment trigger operation can be an operation for proportionally scaling the size of the text bounding box.

[0058] In the disclosed embodiment, after receiving a size adjustment trigger operation acting on the text bounding box, a second typeset path corresponding to the to-be-typesetter text can be determined based on the size information of the adjusted text bounding box. Specifically, the path change information of the first typeset path can be determined based on the size information of the adjusted text bounding box, and then the second typeset path corresponding to the to-be-typesetter text can be determined based on the path change information. Among them, the path change information at least includes radius change information, curvature change information and / or length change information of the path composition curve corresponding to the first typeset path. The technical solution can be used to associate the size of the text bounding box with the change of the typeset path, improve the adaptability of the text bounding box and the typeset path, and ensure the typeset effect of the to-be-typesetter text within the text bounding box.

[0059] Optionally, the determining of the path change information of the first layout path based on the size information of the adjusted text enclosing box includes: determining the path change ratio of the path change information of the first layout path based on the enclosing box size change ratio of the adjusted text enclosing box size information relative to the size information of the text enclosing box before adjustment, and determining the second layout path corresponding to the text to be typeset based on the path change ratio. The path change ratio may include a radius change ratio, a curvature change ratio and / or a length change ratio.

[0060] Exemplarily, determining the path change ratio of the path change information of the first layout path based on the bounding box size change ratio may include: using the bounding box size change ratio as the path change ratio of the path change information of the first layout path, or multiplying the bounding box size change ratio by a preset adjustment coefficient to obtain the path change ratio of the path change information of the first layout path.

[0061] Exemplarily, when the first layout path is a path including a straight line curve, when the size information or size change information of the text bounding box meets a preset condition, the first layout path can be adjusted to an arc curve, and the arc curve is used as the second layout path. At this time, when the path change ratio is a radius change ratio, a second radius corresponding to the second layout path can be obtained by multiplying the first radius of the first layout path by the radius change ratio, and the second layout path can be determined based on the second radius.

[0062] It should be noted that the size information of one of the preset directions of the text enclosing box can be adjusted separately, and the size information of the text enclosing box in other directions remains unchanged; or by adjusting the size information of one of the preset directions of the text enclosing box, the size information of the text enclosing box in other directions can be adaptively adjusted proportionally, that is, proportional scaling is achieved.

[0063] For example, Figure 1B As shown in the figure, the text to be typeset is "text bending test yydsig", and the first typesetting path is the arrangement track of the text characters text, book, bending, curve, test, test, y, y, d, s, i and g, that is, a path including a straight curve. By adjusting the text enclosing box (the white rectangle marked in the figure) surrounding the text to be typeset, it can be changed to Figure 1C and Figure 1D The arc type layout path in the text is the second type layout path. The bending direction of the arc type layout path can be preset or determined according to the changing direction of the edge line when the text bounding box is adjusted.

[0064] In the disclosed embodiment, optionally, after the response to the size adjustment triggering operation acting on the text bounding box, the method further includes: adjusting the font size and / or character spacing of the text characters in the text to be typeset. The technical solution can be used to adjust the display information of a single text character through the text bounding box, thereby enriching the adjustment method of the text characters.

[0065] Optionally, when the size information of the text enclosing box in the extension direction of the first layout path is adjusted separately, the length of the first layout path can be adjusted to keep the shape of the first layout path unchanged.

[0066] Optionally, when the size information of the text enclosing box is adjusted in a proportional scaling manner, the length of the first layout path may be kept unchanged, and the shape of the first layout path may be adjusted to obtain a second layout path.

[0067] In the embodiment of the present disclosure, by adjusting the superimposed layout path through the text bounding box, a richer text layout effect can be achieved.

[0068] S130: Display the text to be typeset in the text editing interface using the second typeset path.

[0069] After determining the second typesetting path to be adopted for the text to be typeset, the target typesetting text obtained after typeset the text to be typeset using the second typesetting path can be determined, and then the target typesetting text can be rendered and displayed in the text editing interface.

[0070] Optionally, after the text to be typeset is typeset in the second typesetting path, the position displayed in the text editing interface can be determined based on its position before typeset. Exemplarily, in the case where the text to be typeset is the entire text of the text to be processed, the text center position or text endpoint position of the text to be processed is determined, and the target typeset text is displayed after the text center position of the target typeset text obtained after typesetting is aligned with the text center position or text endpoint position of the text to be processed. Among them, the text endpoint position can be the character typeset position of the text start character or text end character of the text to be processed under the first typesetting path.

[0071] It should be noted that after the text to be typeset is displayed in the text editing interface in the second typesetting path, the display position of the text to be typeset in the text editing interface can be adjusted in response to a position adjustment trigger operation for the text to be typeset. Exemplarily, the position adjustment operation can be an operation of dragging the text to be typeset, or a control trigger operation acting on a preset moving direction control, etc.

[0072] It is worth noting that in the disclosed embodiment, the first layout path and / or the second layout path includes at least one curved path. In other words, the first layout path and / or the second layout path can be a path composed of one or more curved paths. The advantage of such a setting is that the layout path can present a rich and varied visual effect and support more layout methods to match the diverse layout needs of users.

[0073] The curved path may include a straight path, an arc path, a second-order Bezier curve path or a Bezier curve path, etc. The first layout path and / or the second layout path may be a layout path of a single form, or may be a layout path composed of curved paths of multiple forms, such as a right-angle path, a groove path, a rectangular path or a square wave path composed of two straight paths, or an arch bridge path composed of two straight curved paths connected by an arc path, etc.

[0074] In the embodiment of the present disclosure, after the text to be typeset is typeset in the second typesetting path, one or more text display effects may be superimposed to display the typeset text to be typeset in the text editing interface. The text display effects include but are not limited to one or more of text stroke effects, text shadow effects, text luminous effects, and text animation effects.

[0075] The technical solution of the disclosed embodiment provides a text adding function by displaying the added text to be processed in the text editing interface with the first typesetting path in response to a text adding trigger operation, and can present the typesetting effect of the text to be processed with the first typesetting path without making additional typesetting settings, thereby ensuring the display effect of the text to be processed after adding; then, by responding to the character typesetting trigger operation input for the text to be processed, the text to be typeset corresponding to the text to be processed and the second typesetting path corresponding to the text to be typeset are determined, so that the typesetting path that meets the user's needs can be accurately obtained through user operations, and part or all of the text characters in the text to be processed can be flexibly typeset; finally, by displaying the text to be typeset in the text editing interface with the second typesetting path, the typesetting effect after adjusting to the second typesetting path can be intuitively presented, and the first typesetting path and / or the second typesetting path may include one or more curved paths, thereby realizing the diversification of typesetting paths and providing users with more choices. It solves the technical problems of poor typesetting effect and low video matching caused by a single typesetting path. It can simply and conveniently adjust the typesetting path of the text to be processed, realize diversified presentation of text typesetting styles, and enrich the visualization effect of the text.

[0076] Figure 2 A flowchart of another text processing method provided by the embodiment of the present disclosure. The technical solution of this embodiment further refines how to display the text to be typeset as the second typesetting path based on the above embodiment. Optionally, the text to be typeset is displayed in the text editing interface with the second typesetting path, including: determining the reference character in the characters to be typeset, determining the path composition curve corresponding to the second typesetting path, and determining the target typesetting position and character rotation angle of the reference character in the path composition curve; taking the text characters in the text to be typeset as the characters to be typeset, and determining the target typesetting position and character rotation angle corresponding to each character to be typeset based on the path composition curve and the target typesetting position and character rotation angle corresponding to the reference character; determining the target typesetting text based on the target typesetting position and character rotation angle corresponding to each character to be typeset, and rendering the target typesetting text in the text editing interface. For specific implementation methods, please refer to the description of this embodiment. Among them, the technical features that are the same or similar to those in the above embodiments are not repeated here.

[0077] like Figure 2 As shown, the method of this embodiment may specifically include:

[0078] S210. In response to a text adding trigger operation, displaying the added text to be processed in a text editing interface in a first typesetting path, wherein the text to be processed includes a plurality of text characters.

[0079] S220: In response to a character typesetting triggering operation inputted for the text to be processed, determine a text to be typeset corresponding to the text to be processed and a second typesetting path corresponding to the text to be typeset.

[0080] S230, determining a reference character in the characters to be typeset, determining a path composition curve corresponding to the second typeset path, and determining a target typeset position and a character rotation angle of the reference character in the path composition curve.

[0081] As mentioned above, the path component curve may be a straight line, an arc, a second-order Bezier curve or a third-order Bezier curve, etc. Exemplarily, when the second typesetting path corresponding to the text to be typeset is determined, the path component curve corresponding to the second typesetting path is first determined. Among them, the path component curve can be understood as each curved path that constitutes the second typesetting path. Specifically, the second typesetting path can be parsed to determine each path component curve corresponding to the second typesetting path. By determining the path component curve corresponding to the second typesetting path, the second typesetting path can be parsed to accurately typeset the path component curve corresponding to the second typesetting path.

[0082] Specifically, the determining of the reference character among the characters to be typeset may include: determining the first character to be typeset of the text to be typeset, and using the first character to be typeset as the reference character; determining the starting typesetting position of the arc-shaped curve, and using the starting typesetting position as the target typesetting position corresponding to the reference character. Alternatively, using the previous character to be typeset adjacent to the current character to be typeset as the reference character corresponding to the current character to be typeset.

[0083] The first character to be typeset may be the first text character, the last text character, a set text character (a text character determined based on the selection order of text characters, such as the first selected text character, etc.) of the text to be processed, or a text character located at the center of the text, etc. The starting typesetting position may be the curve starting position, curve center position, preset curve position or curve ending position of the arc-shaped curve, etc.

[0084] S240, taking the text characters in the to-be-typesetted text as the to-be-typesetted characters, and determining the target typeset position and character rotation angle corresponding to each of the to-be-typesetted characters based on the target typeset position and character rotation angle corresponding to the reference characters and the path composition curve.

[0085] Optionally, when the path component curve is an arc-shaped curve, the text typeset length of the text to be typeset in the arc-shaped curve is determined; based on the character spacing between the characters to be typeset and the center angle of the arc-shaped curve, the target typeset position corresponding to each character to be typeset is determined; based on the text typeset length, the character spacing between the characters to be typeset and the center angle of the arc-shaped curve, the character rotation angle corresponding to each character to be typeset is determined. In the disclosed embodiment, an independent algorithm is set for the arc-shaped curve, and it is not calculated as a Bezier curve, which can simplify the calculation method and improve the typesetting efficiency while ensuring the typesetting effect of the text to be typeset.

[0086] Among them, the text typeset length can be understood as the text length of the text to be typeset after typeset according to the path composition curve. The text length can be understood as the sum of the character spacing between every two adjacent text characters from the first text character to the last text character of the text. Optionally, the character spacing can be the spacing between the center points of the text characters. Taking the text "ABCDE" as an example, the first character spacing between A and B, the second character spacing between B and C, the third character spacing between C and D, and the fourth character spacing between D and E under the second typeset path can be determined respectively, and the first character spacing, the second character spacing, the third character spacing, and the fourth character spacing are added together to obtain the text length of the text "ABCDE".

[0087] In the disclosed embodiment, the determination of the text typesetting length corresponding to the text to be typeset based on the circular arc curve may specifically include: obtaining the text typesetting length corresponding to the text to be typeset under the reference typesetting path; using the text typesetting length corresponding to the text to be typeset under the reference typesetting path as the text typesetting length of the text to be typeset in the circular arc curve, or adjusting the text typesetting length corresponding to the text to be typeset under the reference typesetting path to obtain the text typesetting length of the text to be typeset in the circular arc curve. It is understandable that the manner of adjusting the text typesetting length corresponding to the text to be typeset under the reference typesetting path may be associated with the circular arc curve, and the specific adjustment manner may be set according to actual needs, for example, increasing a preset multiple, reducing a preset ratio, increasing a preset spacing value, or reducing a preset spacing value, etc.

[0088] In some scenarios, the length of the path composition curve can be preset. Further, the text layout length corresponding to the text to be typeset under the reference typesetting path can be compared with the preset curve length of the path composition curve, and the smaller length can be used as the text layout length of the text to be typeset in the path composition curve.

[0089] Optionally, in the case where the path composition curve is an arc-shaped curve, the character rotation angle corresponding to each character to be typeset is determined based on the text typeset length, the character spacing between the characters to be typeset, and the center angle of the arc-shaped curve, and may include: determining the interval arc length between the character to be typeset and the reference character based on the character spacing and the center angle between the character to be typeset and the reference character; determining the relative rotation angle of the character to be typeset relative to the reference character based on the interval arc length and the text typeset length, and determining the character rotation angle of the character to be typeset based on the relative rotation angle. By adopting this technical solution, the character rotation angle of the character to be typeset can be determined simply and quickly, saving the computing power space of the electronic device that executes the text processing method, and improving the typesetting efficiency.

[0090] Specifically, the determining the relative rotation angle of the character to be typeset relative to the reference character based on the interval arc length and the text typeset length includes: taking the ratio of the interval arc length to the text typeset length as the central angle ratio, and determining the relative rotation angle of the character to be typeset relative to the reference character based on the central angle corresponding to the path composition curve and the central angle ratio. Exemplarily, the product of the central angle and the central angle ratio is taken as the relative rotation angle of the character to be typeset relative to the reference character.

[0091] Specifically, the target layout position corresponding to each character to be typeset can be determined based on the text layout length, the character spacing between the characters to be typeset, and the center angle of the circular arc curve, which may include: determining the interval arc length between the character to be typeset and the reference character based on the character spacing between the character to be typeset and the reference character and the center angle; determining the target layout position corresponding to the character to be typeset based on the interval arc length and the target layout position of the reference character in the circular arc curve.

[0092] Considering that when using arc curves or Bezier curves for typesetting, the typesetting path of the text to be typeset is curved, which may cause overlapping or jumping of text characters, especially in the rich text scenario. Therefore, the arc curves or Bezier curves can be adjusted or the target typesetting positions of the characters to be typeset can be adjusted to increase the spacing between the characters to be typeset, thereby solving the above problem and making the text to be typeset present a better typesetting effect.

[0093] Taking the path composition curve as an arc curve as an example, the method for adjusting the target typeset position of the characters to be typeset may be, after determining the target typeset position and character rotation angle corresponding to each character to be typeset based on the text typeset length, the character spacing between the characters to be typeset and the center angle of the arc curve, it also includes: when the bending direction of the arc curve is a preset direction, adjusting the target typeset position corresponding to each character to be typeset according to a preset offset distance along a direction away from the bending direction, and updating the adjusted position of the character to be typeset to the target typeset position corresponding to the character to be typeset.

[0094] The bending direction may include bending upward and bending downward. The preset direction may be bending upward and / or bending downward.

[0095] Exemplarily, when the bending direction of the arc-shaped curve is a preset direction, the normal at the target typeset position corresponding to each character to be typeset can be determined first, and then the target typeset position corresponding to each character to be typeset can be adjusted along the normal direction in a direction away from the bending direction according to a preset offset distance.

[0096] The above technical solution can effectively increase the spacing between the characters to be typeset, and is particularly suitable for scenarios where the text to be typeset includes multiple lines of sub-text, so that the text to be typeset can present a better typeset effect.

[0097] Optionally, the method for adjusting the circular arc curve or Bezier curve may be, before determining the target layout position and character rotation angle corresponding to each character to be typeset based on the text layout length, the character spacing between the characters to be typeset and the center angle of the circular arc curve, it also includes: if the text to be typeset includes multiple lines of sub-text, adjusting the radius of the circular arc curve corresponding to each line of the sub-text respectively to increase the spacing between the sub-texts, and updating the circular arc curve based on the adjusted radius.

[0098] Specifically, adjusting the radius of the arc-shaped curve corresponding to each line of the sub-text separately may include: first determining the radius of the arc-shaped curve based on the center angle of the arc-shaped curve, using the radius as the radius corresponding to the first line of the sub-text, and for the remaining lines of the sub-text, determining the radius corresponding to the sub-text in the current line based on the preset offset distance and the radius corresponding to the sub-text in the previous line. The advantage of such a setting is that it can ensure the overall typesetting effect of the text to be typeset while ensuring the single-character display effect of the characters to be typeset. It is particularly suitable for superimposing multiple text display effects to generate rich text for display.

[0099] In some scenarios, the second typesetting path may include a Bezier curve, that is, the path component curve includes a Bezier curve. In this case, the target typesetting position and character rotation angle corresponding to each character to be typeset are determined based on the path component curve and the target typesetting position and character rotation angle corresponding to the reference character, including: when the path component curve is a Bezier curve, the target typesetting position and character rotation angle corresponding to the character to be typeset are determined one by one by using a Newton interpolation approximation algorithm. By adopting this technical solution, it is possible to ensure that the typesetting effect of the multiple characters to be typeset fits the trajectory of the Bezier curve and the character spacing between the characters to be typeset can be ensured, thereby ensuring the typesetting effect of the text to be typeset.

[0100] Specifically, in the case where the path composition curve is a Bezier curve, the target layout position of the current character to be typeset on the Bezier curve is calculated through the Newton interpolation approximation algorithm according to the target layout position corresponding to the previous character to be typeset and the character distance between the current character to be typeset, thereby determining the target layout position corresponding to each character to be typeset one by one.

[0101] Furthermore, the character rotation angle corresponding to the character to be typeset can be determined based on the target typeset position corresponding to the character to be typeset. Specifically, the character rotation angle corresponding to the character to be typeset can be determined based on the angle between the normal of the character to be typeset at the target typeset position on the Bezier curve and the reference baseline. The reference baseline can be a preset reference reference line, such as a preset horizontal line, or a reference reference line determined based on the target typeset position and the character rotation angle of the previous character to be typeset of the current character to be typeset. Alternatively, the relative rotation angle between the current character to be typeset and the previous character to be typeset can be determined first, and then the character rotation angle corresponding to the current character to be typeset can be determined based on the character rotation angle corresponding to the previous character to be typeset and the relative rotation angle.

[0102] S250: Determine a target typeset text based on the target typeset position and the character rotation angle corresponding to each of the to-be-typeset characters, and render the target typeset text in the text editing interface.

[0103] When the target typesetting position and the character rotation angle corresponding to each character to be typeset in the text to be typeset are determined, each character to be typeset is arranged according to the corresponding target typesetting position and the character rotation angle to obtain a target typesetting text, and then the target typesetting text is rendered in the text editing interface.

[0104] In an embodiment of the present disclosure, rendering the target typeset text in the text editing interface may specifically include: determining a text width corresponding to the target text, updating size information of a text typeset box corresponding to the target text and size information of a text drawing container based on the text width; and rendering the target typeset text in the text editing interface based on the text typeset box and the text drawing container after the size information is updated.

[0105] It is understandable that the rendering of the target typeset text also includes related rendering logic, for example, texture update, grid calculation and material update processing of the target typeset text. On this basis, animation after-effect processing can also be added to the target typeset text. The specific rendering logic can be implemented according to existing technology and will not be repeated here.

[0106] The technical solution of the disclosed embodiment is to determine the reference character in the characters to be typeset, determine the path composition curve corresponding to the second typeset path, and determine the target typeset position and character rotation angle of the reference character in the path composition curve. Then, by taking the text characters in the text to be typeset as the characters to be typeset, the target typeset position and character rotation angle corresponding to each character to be typeset are determined based on the path composition curve and the target typeset position and character rotation angle corresponding to the reference character. The character typesetting information on each segment of the path composition curve can be determined separately, thereby ensuring that the target typeset position and character rotation angle of the characters to be typeset are highly matched with the path composition curve. Finally, the target typeset text is determined based on the target typeset position and character rotation angle corresponding to each character to be typeset, and the target typeset text is rendered in the text editing interface, thereby ensuring the typesetting effect of the target typeset text obtained after typeset with the second typeset path.

[0107] Figure 3 A flowchart of another text processing method provided by the embodiment of the present disclosure. The technical solution of this embodiment adds layout settings for the text to be typeset on the basis of the above-mentioned embodiment. Optionally, after displaying the text to be typeset in the text editing interface with the second typesetting path, it also includes: in response to a background color setting trigger operation input for the text to be typeset, determining a background area corresponding to the text to be typeset, and displaying the background area with a set color. . For specific implementation methods, please refer to the description of this embodiment. Among them, technical features that are the same or similar to those in the above-mentioned embodiments are not repeated here.

[0108] like Figure 3 As shown, the method of the embodiment of the present disclosure may specifically include:

[0109] S310. In response to a text adding trigger operation, displaying the added text to be processed in a text editing interface in a first typesetting path, wherein the text to be processed includes a plurality of text characters.

[0110] S320: In response to a character typesetting triggering operation inputted for the text to be processed, determine a text to be typeset corresponding to the text to be processed and a second typesetting path corresponding to the text to be typeset.

[0111] S330: Display the text to be typeset in the text editing interface using the second typeset path.

[0112] S340: In response to a background color setting trigger operation input for the text to be typeset, determine a background area corresponding to the text to be typeset, and display the background area in a set color.

[0113] The background color setting trigger operation can be understood as an operation for setting the background color of the text to be typeset after being triggered. The text to be typeset here can be understood as the text displayed in the second typeset path. The background area can be understood as the remaining area in the target area corresponding to the text to be typeset except the text to be typeset.

[0114] In the embodiments of the present disclosure, there may be multiple ways to generate a background color setting trigger operation. Exemplarily, the background color setting trigger operation for the input text to be typeset may be to display a color setting control in the text editing interface, and when the text to be typeset is in a selected state, respond to a control trigger operation acting on the color setting control. The color setting control may be a single color selection control corresponding to each color, or a color switching control that switches between multiple colors according to a preset switching strategy, etc. The preset switching rule may be to switch sequentially according to the arrangement order of multiple colors or to switch randomly between multiple colors.

[0115] Optionally, determining the background area corresponding to the text to be typeset includes: determining a text background box corresponding to the text to be typeset based on the second typesetting path, so as to use the area surrounded by the text background box as the background area corresponding to the text to be typeset.

[0116] Wherein, in the case where the text to be typeset includes multiple lines of sub-texts, the text background box is an overall background box corresponding to all the sub-texts of the text to be typeset or a line background box corresponding to a single line of the sub-text. Optionally, a background box setting control corresponding to the second path curve is displayed in the text editing interface, and when the text to be typeset includes multiple lines of sub-texts and the multiple lines of sub-texts are in a selected state, in response to a control triggering operation acting on the background box setting control, a text background box corresponding to the text to be typeset is determined. Wherein, the color setting control may include selection controls corresponding to the overall background box and the single-line background box, respectively, or a color switching control for switching between the overall background box and the single-line background box, etc. The advantage of such a setting is that the form of the text background box can be selected simply and conveniently, and the flexible setting of the file background box is supported, and user needs can be accurately responded to through simple interactive operations.

[0117] As an optional technical solution of the embodiment of the present disclosure, the path starting point and the path end point of the second typesetting path can be determined, and the text background box corresponding to the text to be typeset is determined based on the path starting point and the path end point. In the text background box, the path starting point and the path end point are included. The advantage of such a setting is that the length of the text background box can match the length of the second typesetting path to form an encirclement effect. Optionally, the shape of the text background box can match the shape of the second typesetting path, or it can be a preset shape, such as a rectangle or a circle.

[0118] On the basis of the above technical solution, the text processing method may further include: in response to a size adjustment operation input to the text background box, updating the text background box based on the adjusted size parameters. The size parameters include one or more parameters such as width, length, and scaling. By adopting this technical solution, it is possible to flexibly adjust the size of the text background box to present different interaction effects with the text to be typeset, thereby enriching the display effect of the text to be typeset.

[0119] The technical solution of the embodiment of the present disclosure determines the background area corresponding to the text to be typeset in response to the background color setting trigger operation input for the text to be typeset, displays the background area with a set color, and can highlight the text to be typeset by setting the color of the background area, and superimpose the color effect of the background area on the effect after typeset of the text to be typeset, so that the display effect of the text to be typeset is more diversified.

[0120] Figure 4 A structural diagram of a text processing device provided by an embodiment of the present disclosure is shown in FIG. Figure 4As shown, the device includes: a text adding module 410, a typesetting triggering module 420 and a typesetting updating module 430.

[0121] Among them, the text adding module 410 is used to display the added text to be processed in the text editing interface with a first typesetting path in response to a text adding trigger operation, wherein the text to be processed includes multiple text characters; the typesetting trigger module 420 is used to determine the text to be typeset corresponding to the text to be processed and the second typesetting path corresponding to the text to be typeset in response to a character typesetting trigger operation input for the text to be processed, wherein the text to be typeset is a text composed of part or all of the text characters in the text to be processed; the typesetting update module 430 is used to display the text to be typeset in the text editing interface with the second typesetting path, wherein the first typesetting path and / or the second typesetting path include at least one curved path.

[0122] The technical solution of the disclosed embodiment provides a text adding function by displaying the added text to be processed in the text editing interface with the first typesetting path in response to a text adding trigger operation, and can present the typesetting effect of the text to be processed with the first typesetting path without making additional typesetting settings, thereby ensuring the display effect of the text to be processed after adding; then, by responding to the character typesetting trigger operation input for the text to be processed, the text to be typeset corresponding to the text to be processed and the second typesetting path corresponding to the text to be typeset are determined, so that the typesetting path that meets the user's needs can be accurately obtained through user operations, and part or all of the text characters in the text to be processed can be flexibly typeset; finally, by displaying the text to be typeset in the text editing interface with the second typesetting path, the typesetting effect after adjusting to the second typesetting path can be intuitively presented, and the first typesetting path and / or the second typesetting path may include one or more curved paths, thereby realizing the diversification of typesetting paths and providing users with more choices. It solves the technical problems of poor typesetting effect and low video matching caused by a single typesetting path. It can simply and conveniently adjust the typesetting path of the text to be processed, realize diversified presentation of text typesetting styles, and enrich the visualization effect of the text.

[0123] On the basis of the above-mentioned optional technical solutions, optionally, the typesetting trigger module 420 includes: a character selection unit and a typesetting switching unit. The character selection unit is used to respond to the character selection trigger operation input for at least part of the text characters in the text to be processed, and use the text composed of the selected text characters as the text to be typeset; the typesetting switching unit is used to respond to the typesetting switching trigger operation input for the text to be typeset, determine the typesetting path after switching, and use the typesetting path after switching as the second typesetting path corresponding to the text to be typeset.

[0124] Based on the above optional technical solutions, optionally, the typesetting switching unit is used to:

[0125] In the case where the text editing interface displays a plurality of layout path identifiers, in response to an identifier selection operation for the layout path identifier, determining a preset layout path corresponding to the selected layout path identifier as the switched layout path; or,

[0126] In response to a control trigger operation acting on a typesetting switch control, the switched typesetting path is determined based on the first typesetting path and a preset switching rule, wherein the preset switching rule is to perform random switching among multiple preset typesetting paths or to perform sequential switching according to a preset switching order corresponding to multiple preset typesetting paths.

[0127] Based on the above optional technical solutions, optionally, the typesetting trigger module 420 includes: a bounding box display unit and a path determination unit. The bounding box display unit is used to display a text bounding box corresponding to the first typesetting path, and use the to-be-processed text in the text bounding box as the text to be typeset; the path determination unit is used to respond to a size adjustment trigger operation acting on the text bounding box, and determine a second typesetting path corresponding to the text to be typeset based on the size information of the adjusted text bounding box.

[0128] Based on the above optional technical solutions, optionally, the path determination unit is specifically used to:

[0129] Based on the adjusted size information of the text bounding box, the path change information of the first typesetting path is determined, and based on the path change information, the second typesetting path corresponding to the text to be typeset is determined, wherein the path change information includes at least one of radius change information, curvature change information and length change information of the path component curve corresponding to the first typesetting path.

[0130] Based on the above optional technical solutions, optionally, the path determination unit is further used to:

[0131] After the response to the size adjustment triggering operation acting on the text bounding box, the font size and / or character spacing of the text characters in the text to be typeset are adjusted.

[0132] On the basis of the above-mentioned optional technical solutions, optionally, the typesetting update module 430 includes a reference character determination unit, a typesetting information determination unit and a typesetting effect display unit. The reference character determination unit is used to determine the reference character in the characters to be typeset, determine the path composition curve corresponding to the second typesetting path, and determine the target typesetting position and character rotation angle of the reference character in the path composition curve; the typesetting information determination unit is used to take the text characters in the text to be typeset as the characters to be typeset, and determine the target typesetting position and character rotation angle corresponding to each character to be typeset based on the path composition curve and the target typesetting position and character rotation angle corresponding to the reference character; the typesetting effect display unit is used to determine the target typesetting text based on the target typesetting position and character rotation angle corresponding to each character to be typeset, and render the target typesetting text in the text editing interface.

[0133] On the basis of the above-mentioned optional technical solutions, optionally, the typesetting information determination unit includes a text length determination unit, a typesetting position determination subunit and a rotation angle determination subunit. Among them, the text length determination unit is used to determine the text typesetting length of the text to be typeset in the circular arc curve when the path composition curve is a circular arc curve; the typesetting position determination subunit is used to determine the target typesetting position corresponding to each of the characters to be typeset based on the character spacing between the characters to be typeset and the center angle of the circular arc curve; the rotation angle determination subunit is used to determine the character rotation angle corresponding to each of the characters to be typeset based on the text typesetting length, the character spacing between the characters to be typeset and the center angle of the circular arc curve.

[0134] Based on the above optional technical solutions, optionally, the rotation angle determination subunit is used to:

[0135] Determine the arc length of the interval between the character to be typeset and the reference character based on the character spacing between the character to be typeset and the reference character and the center angle of the circle;

[0136] A relative rotation angle of the character to be typeset relative to the reference character is determined based on the interval arc length and the text typeset length, and a character rotation angle of the character to be typeset is determined based on the relative rotation angle.

[0137] Based on the above optional technical solutions, optionally, the text processing device further includes:

[0138] A character typeset position adjustment module is used to determine the target typeset position and character rotation angle corresponding to each character to be typeset based on the text typeset length, the character spacing between the characters to be typeset and the center angle of the circular arc curve. When the bending direction of the circular arc curve is a preset direction, the target typeset position corresponding to each character to be typeset is adjusted according to a preset offset distance along a direction away from the bending direction, and the adjusted position of the character to be typeset is updated to the target typeset position corresponding to the character to be typeset.

[0139] Based on the above optional technical solutions, optionally, the text processing device further includes:

[0140] A typesetting path adjustment module is used to adjust the radius of the arc-shaped curve corresponding to each line of sub-text respectively before determining the target typesetting position and character rotation angle corresponding to each character to be typeset based on the text typeset length, the character spacing between the characters to be typeset and the center angle of the arc-shaped curve. If the text to be typeset includes multiple lines of sub-text, the radius of the arc-shaped curve corresponding to each line of the sub-text is adjusted to increase the spacing between the sub-texts, and the arc-shaped curve is updated based on the adjusted radius.

[0141] Based on the above optional technical solutions, optionally, the typesetting information determination unit is used to:

[0142] In the case where the path component curve is a Bezier curve, the target typesetting position and the character rotation angle corresponding to the to-be-typesetter characters are determined one by one by using a Newton interpolation approximation algorithm.

[0143] On the basis of the above-mentioned optional technical solutions, optionally, the text processing device also includes: a background color setting module, which is used to determine the background area corresponding to the text to be typeset in response to the background color setting trigger operation input for the text to be typeset after the text to be typeset is displayed in the text editing interface with the second typesetting path, and display the background area with the set color.

[0144] Based on the above optional technical solutions, optionally, the background color setting module is specifically used to:

[0145] Based on the second typesetting path, a text background box corresponding to the text to be typeset is determined, so that the area enclosed by the text background box is used as the background area corresponding to the text to be typeset, wherein, in the case that the text to be typeset includes multiple lines of sub-texts, the text background box is an overall background box corresponding to all the sub-texts of the text to be typeset or a line background box corresponding to a single line of sub-texts.

[0146] The text processing device provided in the embodiments of the present disclosure can execute the text processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0147] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0148] Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 5 , which shows an electronic device (eg, Figure 5 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0149] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.

[0150] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0151] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0152] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0153] The electronic device provided by the embodiment of the present disclosure and the text processing method provided by the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0154] The embodiments of the present disclosure provide a computer storage medium on which a computer program is stored. When the program is executed by a processor, the text processing method provided by the above embodiments is implemented.

[0155] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0156] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0157] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0158] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: in response to a text adding trigger operation, displays the added text to be processed in a text editing interface with a first typesetting path, wherein the text to be processed includes multiple text characters; in response to a character typesetting trigger operation input for the text to be processed, determines the text to be typeset corresponding to the text to be processed and the second typesetting path corresponding to the text to be typeset, wherein the text to be typeset is a text composed of part or all of the text characters in the text to be processed; displays the text to be typeset in the text editing interface with the second typesetting path, wherein the first typesetting path and / or the second typesetting path include at least one curved path.

[0159] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0160] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0161] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0162] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0163] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0164] According to one or more embodiments of the present disclosure, [Example 1] provides a text processing method, comprising: in response to a text adding trigger operation, displaying the added text to be processed in a text editing interface with a first typesetting path, wherein the text to be processed includes a plurality of text characters; in response to a character typesetting trigger operation input for the text to be processed, determining the text to be typeset corresponding to the text to be processed and a second typesetting path corresponding to the text to be typeset, wherein the text to be typeset is text composed of part or all of the text characters in the text to be processed; displaying the text to be typeset in the text editing interface with the second typesetting path, wherein the first typesetting path and / or the second typesetting path include at least one curved path.

[0165] According to one or more embodiments of the present disclosure, [Example 2] provides the method of Example 1, further including: optionally, in response to a character typesetting trigger operation input for the text to be processed, determining the text to be typeset corresponding to the text to be processed and a second typesetting path corresponding to the text to be typeset, including: in response to a character selection trigger operation input for at least part of the text characters in the text to be processed, using the text composed of the selected text characters as the text to be typeset; in response to a typesetting switching trigger operation input for the text to be typeset, determining a typesetting path after switching, and using the typesetting path after switching as the second typesetting path corresponding to the text to be typeset.

[0166] According to one or more embodiments of the present disclosure, [Example Three] provides the method of Example Two, further including: optionally, determining the switched typesetting path in response to a typesetting switch trigger operation, including: when multiple typesetting path identifiers are displayed on the text editing interface, in response to an identifier selection operation for the typesetting path identifier, determining the preset typesetting path corresponding to the selected typesetting path identifier as the switched typesetting path; or, in response to a control trigger operation acting on a typesetting switch control, determining the switched typesetting path based on the first typesetting path and a preset switching rule, wherein the preset switching rule is to randomly switch among multiple preset typesetting paths or to sequentially switch according to a preset switching order corresponding to multiple preset typesetting paths.

[0167] According to one or more embodiments of the present disclosure, [Example 4] provides the method of Example 1, further including: optionally, in response to a character typesetting trigger operation input for the text to be processed, determining the text to be typeset corresponding to the text to be processed and a second typesetting path corresponding to the text to be typeset, including: displaying a text enclosing box corresponding to the first typesetting path, and using the text to be processed located in the text enclosing box as the text to be typeset; in response to a size adjustment trigger operation acting on the text enclosing box, determining the second typesetting path corresponding to the text to be typeset based on the size information of the adjusted text enclosing box.

[0168] According to one or more embodiments of the present disclosure, [Example 5] provides the method of Example 4, further including: optionally, determining a second typeset path corresponding to the text to be typeset based on the adjusted size information of the text enclosing box, including: determining path change information of the first typeset path based on the adjusted size information of the text enclosing box, and determining the second typeset path corresponding to the text to be typeset based on the path change information, wherein the path change information includes at least one of radius change information, curvature change information and length change information of a path composition curve corresponding to the first typeset path.

[0169] According to one or more embodiments of the present disclosure, [Example Six] provides the method of Example Four, further including: optionally, after the response to the size adjustment trigger operation acting on the text bounding box, it also includes: adjusting the font size and / or character spacing of the text characters in the text to be typeset.

[0170] According to one or more embodiments of the present disclosure, [Example 7] provides the method of Example 1, further including: optionally, determining a reference character in the characters to be typeset, determining a path composition curve corresponding to the second typeset path, and determining a target typeset position and a character rotation angle of the reference character in the path composition curve; taking the text characters in the text to be typeset as the characters to be typeset, and determining the target typeset position and a character rotation angle corresponding to each of the characters to be typeset based on the path composition curve and the target typeset position and the character rotation angle corresponding to the reference character; determining a target typeset text based on the target typeset position and the character rotation angle corresponding to each of the characters to be typeset, and rendering the target typeset text in the text editing interface.

[0171] According to one or more embodiments of the present disclosure, [Example 8] provides the method of Example 7, further including: optionally, determining the target typeset position and character rotation angle corresponding to each of the characters to be typeset based on the path composition curve and the target typeset position and character rotation angle corresponding to the reference character, including: when the path composition curve is an arc-shaped curve, determining the text typeset length of the text to be typeset in the arc-shaped curve; determining the target typeset position corresponding to each of the characters to be typeset based on the character spacing between the characters to be typeset and the center angle of the arc-shaped curve; determining the character rotation angle corresponding to each of the characters to be typeset based on the text typeset length, the character spacing between the characters to be typeset and the center angle of the arc-shaped curve.

[0172] According to one or more embodiments of the present disclosure, [Example 9] provides the method of Example 8, further including: optionally, after determining the target typeset position and character rotation angle corresponding to each character to be typeset based on the text typeset length, the character spacing between the characters to be typeset and the center angle of the circular arc curve, it also includes: when the bending direction of the circular arc curve is a preset direction, adjusting the target typeset position corresponding to each character to be typeset according to a preset offset distance along a direction away from the bending direction, and updating the adjusted position of the character to be typeset to the target typeset position corresponding to the character to be typeset.

[0173] According to one or more embodiments of the present disclosure, [Example 10] provides the method of Example 8, further including: optionally, before determining the target layout position and character rotation angle corresponding to each character to be typeset based on the text layout length, the character spacing between the characters to be typeset, and the center angle of the circular arc curve, it also includes: if the text to be typeset includes multiple lines of sub-text, adjusting the radius of the circular arc curve corresponding to each line of the sub-text respectively to increase the spacing between the sub-texts, and updating the circular arc curve based on the adjusted radius.

[0174] According to one or more embodiments of the present disclosure, [Example 11] provides the method of Example 1, further including: optionally, after displaying the text to be typeset in the text editing interface with the second typesetting path, it also includes: in response to a background color setting trigger operation input for the text to be typeset, determining a background area corresponding to the text to be typeset, and displaying the background area with a set color.

[0175] According to one or more embodiments of the present disclosure, [Example 12] provides the method of Example 11, further including: optionally, determining the background area corresponding to the text to be typeset includes: determining a text background box corresponding to the text to be typeset based on the second typesetting path, so as to use the area enclosed by the text background box as the background area corresponding to the text to be typeset, wherein, in the case that the text to be typeset includes multiple lines of sub-texts, the text background box is an overall background box corresponding to all the sub-texts of the text to be typeset or a line background box corresponding to a single line of the sub-text.

[0176] According to one or more embodiments of the present disclosure, [Example 13] provides a text processing device, including: a text adding module, used to display the added text to be processed in a text editing interface with a first typesetting path in response to a text adding trigger operation, wherein the text to be processed includes multiple text characters; a typesetting trigger module, used to determine the text to be typeset corresponding to the text to be processed and the second typesetting path corresponding to the text to be typeset in response to a character typesetting trigger operation input for the text to be processed, wherein the text to be typeset is a text composed of some or all of the text characters in the text to be processed; a typesetting update module, used to display the text to be typeset in the text editing interface with the second typesetting path, wherein the first typesetting path and / or the second typesetting path include at least one curved path.

[0177] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0178] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0179] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A text processing method, characterized in that: include: In response to a text adding trigger operation, the added text to be processed is displayed in a text editing interface in a first typesetting path, wherein the text to be processed includes a plurality of text characters; In response to a character typesetting trigger operation inputted for the text to be processed, determining a text to be typeset corresponding to the text to be processed and a second typesetting path corresponding to the text to be typeset, wherein the text to be typeset is a text composed of part or all of the text characters in the text to be processed; The text to be typeset is displayed in the text editing interface along the second typeset path, wherein the first typeset path and / or the second typeset path includes at least one curved path.

2. The text processing method according to claim 1, characterized in that: The step of determining the text to be typeset corresponding to the text to be processed and the second typeset path corresponding to the text to be typeset in response to the character typeset triggering operation inputted for the text to be processed includes: In response to a character selection trigger operation input for at least part of the text characters in the text to be processed, taking the text composed of the selected text characters as the text to be typeset; In response to a typesetting switching trigger operation input for the text to be typeset, a typesetting path after switching is determined, and the typesetting path after switching is used as a second typesetting path corresponding to the text to be typeset.

3. The text processing method according to claim 2, characterized in that: The step of determining a post-switching layout path in response to a layout switching trigger operation includes: In the case where the text editing interface displays a plurality of layout path identifiers, in response to an identifier selection operation for the layout path identifier, determining a preset layout path corresponding to the selected layout path identifier as the switched layout path; or, In response to a control trigger operation acting on a typesetting switch control, the switched typesetting path is determined based on the first typesetting path and a preset switching rule, wherein the preset switching rule is to perform random switching among multiple preset typesetting paths or to perform sequential switching according to a preset switching order corresponding to multiple preset typesetting paths.

4. The text processing method according to claim 1, characterized in that: The step of determining the text to be typeset corresponding to the text to be processed and the second typeset path corresponding to the text to be typeset in response to the character typeset triggering operation inputted for the text to be processed includes: Display a text enclosing frame corresponding to the first typesetting path, and use the text to be processed located in the text enclosing frame as the text to be typeset; In response to a size adjustment triggering operation acting on the text enclosing box, a second layout path corresponding to the to-be-layouted text is determined based on the size information of the adjusted text enclosing box.

5. The text processing method according to claim 4, characterized in that: The determining a second layout path corresponding to the to-be-layouted text based on the adjusted size information of the text enclosing box includes: Based on the adjusted size information of the text bounding box, the path change information of the first typesetting path is determined, and based on the path change information, the second typesetting path corresponding to the text to be typeset is determined, wherein the path change information includes at least one of radius change information, curvature change information and length change information of the path component curve corresponding to the first typesetting path.

6. The text processing method according to claim 4, characterized in that: After the size adjustment triggering operation acting on the text enclosing frame is responded to, the method further includes: The font size and / or character spacing of the text characters in the text to be typeset are adjusted.

7. The text processing method according to claim 1, characterized in that: The step of displaying the text to be typeset in the text editing interface using the second typeset path includes: Determine a reference character in the characters to be typeset, determine a path composition curve corresponding to the second typeset path, and determine a target typeset position and a character rotation angle of the reference character in the path composition curve; Taking the text characters in the to-be-typesetted text as the to-be-typesetted characters, and determining the target typesetting position and character rotation angle corresponding to each of the to-be-typesetted characters based on the path composition curve and the target typesetting position and character rotation angle corresponding to the reference character; The target typeset text is determined based on the target typeset position corresponding to each of the to-be-typeset characters and the character rotation angle, and the target typeset text is rendered in the text editing interface.

8. The text processing method according to claim 7, characterized in that: The step of determining the target typesetting position and the character rotation angle corresponding to each of the to-be-typeset characters based on the path composition curve and the target typesetting position and the character rotation angle corresponding to the reference character comprises: In the case where the path component curve is an arc-shaped curve, determining the text typesetting length of the text to be typeset in the arc-shaped curve; Determining a target typeset position corresponding to each of the characters to be typeset based on the character spacing between the characters to be typeset and the center angle of the arc-shaped curve; Based on the text typeset length, the character spacing between the characters to be typeset, and the center angle of the arc-shaped curve, a character rotation angle corresponding to each character to be typeset is determined.

9. The text processing method according to claim 8, characterized in that: After determining the target typesetting position and character rotation angle corresponding to each character to be typeset based on the text typesetting length, the character spacing between the characters to be typeset, and the center angle of the arc curve, the method further includes: When the bending direction of the arc-shaped curve is a preset direction, the target typeset position corresponding to each character to be typeset is adjusted along a direction away from the bending direction according to a preset offset distance, and the adjusted position of the character to be typeset is updated to the target typeset position corresponding to the character to be typeset.

10. The text processing method according to claim 8, characterized in that: Before determining the target typesetting position and character rotation angle corresponding to each character to be typeset based on the text typesetting length, the character spacing between the characters to be typeset, and the center angle of the arc curve, the method further includes: If the text to be typeset includes multiple lines of sub-texts, the radius of the arc-shaped curve corresponding to each line of the sub-text is adjusted respectively to increase the spacing between the sub-texts, and the arc-shaped curve is updated based on the adjusted radius.

11. The text processing method according to claim 1, characterized in that: After displaying the text to be typeset in the text editing interface using the second typeset path, the method further includes: In response to a background color setting trigger operation input for the text to be typeset, a background area corresponding to the text to be typeset is determined, and the background area is displayed in a set color.

12. The text processing method according to claim 11, characterized in that: The determining of the background area corresponding to the text to be typeset includes: Based on the second typesetting path, a text background box corresponding to the text to be typeset is determined, so that the area enclosed by the text background box is used as the background area corresponding to the text to be typeset, wherein, in the case that the text to be typeset includes multiple lines of sub-texts, the text background box is an overall background box corresponding to all the sub-texts of the text to be typeset or a line background box corresponding to a single line of sub-texts.

13. A text processing device, characterized in that: include: A text adding module, configured to display the added text to be processed in a first typesetting path in a text editing interface in response to a text adding triggering operation, wherein the text to be processed includes a plurality of text characters; a typesetting trigger module, configured to determine, in response to a character typesetting trigger operation inputted for the text to be processed, a text to be typeset corresponding to the text to be processed and a second typesetting path corresponding to the text to be typeset, wherein the text to be typeset is a text composed of part or all of the text characters in the text to be processed; A typesetting update module is used to display the text to be typeset in the text editing interface using the second typesetting path, wherein the first typesetting path and / or the second typesetting path includes at least one curved path.

14. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the text processing method as described in any one of claims 1-12.

15. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to perform the text processing method according to any one of claims 1 to 12.

Citation Information

Cited By

  • Deformed character typesetting rendering method, device and equipment based on path

    CN121236228A

  • Text processing method, apparatus, electronic device and storage medium

    EP4776174A1

  • Text processing method, apparatus, electronic device and storage medium

    WO2025051212A1