Text processing method, apparatus, electronic device and storage medium
By providing text processing methods in video editing scenes, users are allowed to flexibly select and adjust the layout path of text in the video editing interface, solving the problem of fixed layout methods in the prior art, and achieving diversified text layout effects and video matching.
Patent Information
- Application Number
- PCT/CN2024/117284
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-08
- Filing Date
- 2024-09-05
- Publication Date
- 2025-03-13
AI Technical Summary
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 unable to meet the diverse video content.
Provides a text processing method, which displays multiple typesetting paths, including curved paths, in the text editing interface by responding to text addition and character typesetting trigger operations, allowing users to flexibly select and adjust typesetting paths.
It realizes the diversified layout effect of text, meets the matching needs of different video content, enriches the visualization effect of text, and provides more layout path selection.
Smart Images

Figure CN2024117284_13032025_PF_FP_ABST
Abstract
Description
Text processing method, device, electronic device and storage medium
[0001] This application claims priority to the Chinese invention patent application filed on September 8, 2023, with application number 202311162507.2 and titled “Text processing method, device, electronic device and storage medium”. The entire contents of the Chinese patent application are incorporated into this application by reference. Technical Field
[0002] 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
[0003] In video editing, adding text to a video to enrich the video effect is a popular method among users. In other words, in video editing, text editing is a basic and important function, and in text editing, typesetting is a relatively core function.
[0004] In related technologies, the layout of text in video editing scenes is often fixed, resulting in a relatively simple visual effect. However, video content is often diverse, and the expected matching text layout is also different. This fixed text layout method is often difficult to meet the diverse needs of video editing.
[0005] Summary of the Invention
[0006] The present disclosure provides a text processing method, device, electronic device and storage medium to achieve diversified typesetting effects of text.
[0007] In a first aspect, an embodiment of the present disclosure provides a text processing method, the 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 a text composed of part or all of the text characters in the text to be processed; and 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.
[0008] In a second aspect, an embodiment of the present disclosure further provides a text processing device, which includes: a text adding module, for displaying 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, for 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 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, for 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.
[0009] In a third aspect, an embodiment of the present disclosure further provides an electronic device comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement a text processing method as described in any one of the embodiments of the present disclosure.
[0010] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the text processing method as described in any one of the embodiments of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0012] FIG1A is a flow chart of a text processing method provided by an embodiment of the present disclosure;
[0013] FIG1B is a schematic diagram of a text processing method provided by an embodiment of the present disclosure using a straight curve as a first typesetting path;
[0014] FIG1C is a schematic diagram of a text processing method provided by an embodiment of the present disclosure, in which a downward-curving arc curve is used as a second typesetting path;
[0015] FIG1D is a schematic diagram showing a text processing method provided by an embodiment of the present disclosure, which uses an upward curved arc curve as a second typesetting path;
[0016] FIG2 is a flow chart of another text processing method provided by an embodiment of the present disclosure;
[0017] FIG3 is a flow chart of another text processing method provided by an embodiment of the present disclosure;
[0018] FIG4 is a schematic structural diagram of a text processing device provided by an embodiment of the present disclosure; and
[0019] FIG5 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0020] The following describes embodiments of the present disclosure in more detail 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 limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0021] 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.
[0022] As used herein, the term "including" and its variations are open-ended, 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," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0023] It should be noted that the concepts of "first" and "second" mentioned in this 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.
[0024] It should be noted that the modifications of "one" and "multiple" 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, they should be understood as "one or more".
[0025] 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.
[0026] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this 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.
[0027] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0028] As an optional but non-limiting implementation, in response to receiving a user's active request, 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. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0029] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0030] 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) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0031] Figure 1A is a flow chart of a text processing method provided by an embodiment of the present disclosure. 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. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc.
[0032] As shown in FIG1A , the method of this embodiment may specifically include the following steps.
[0033] S110 . In response to a text adding trigger operation, display the added text to be processed in a text editing interface using a first typesetting path, wherein the text to be processed includes a plurality of text characters.
[0034] 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 layout 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.
[0035] In the embodiments of the present disclosure, the text addition trigger operation can be generated in a variety of ways. For example, in response to a control trigger operation acting on a text submission control, text entered in a preset text input control can be 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.
[0036] 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.
[0037] As an optional embodiment of the present disclosure, a text action object, such as a picture or video, is displayed in the text editing interface. In response to a text addition trigger operation inputted for the text object, the added text to be processed is displayed at a preset position of the text action object using a first typesetting path, 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, the top, middle, bottom, or one-third of the distance from the top border of the text action object.
[0038] 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 tilt angle corresponding to the text characters, and the style of the text characters (such as bold, color, shadow or glow, etc.).
[0039] It is understood that during the process of adding the text to be processed, the text attribute information corresponding to the text to be processed is associated with the text editing operation input. 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.
[0040] 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.
[0041] 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 the 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.
[0042] In an optional implementation of the embodiment of the present disclosure, 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 refined typesetting of the text to be processed can be achieved with the text characters as the processing unit. 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.
[0043] 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 an operation for selecting the second layout path or an operation for switching the first layout path.
[0044] 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, in which the text characters located in the box selection area are taken as the selected text characters; or, based on a cursor drag 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.
[0045] Optionally, the response to the typesetting switch trigger operation to determine the typesetting path after switching includes: when multiple typesetting path identifiers are displayed on the text editing interface, in response to the identifier selection operation for the typesetting path identifier, the preset typesetting path corresponding to the selected typesetting path identifier is determined 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.
[0046] Optionally, the determining of the switched layout path in response to a 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 a 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. This technical solution supports users in quickly previewing the layout effects corresponding to multiple layout paths. The operation is simple, saving users the time of searching for layout paths, and multiple layout path effects can be displayed through one-click switching.
[0047] In another optional implementation of the disclosed embodiment, the determination of 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 a character typeset trigger operation input for the text to be processed may include: displaying a text bounding box corresponding to the first typeset path, and using the text to be processed located in the text bounding box as the text to be typeset; and determining the second typeset path corresponding to the text to be typeset based on the size information of the adjusted text bounding box in response to a size adjustment trigger operation acting on the text bounding box. This technical solution can 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 flexible adjustment of the typesetting path can be achieved. The text to be typeset can be reasonably arranged in the text bounding box, thereby improving the text typesetting effect.
[0048] 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.
[0049] In the embodiment 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, if 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.
[0050] In an embodiment of the present disclosure, after receiving a size adjustment trigger operation acting on the text bounding box, the second typeset path corresponding to the text to be typeset 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 text to be typeset can be determined based on the path change information. 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 use of this technical solution can 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 text to be typeset within the text bounding box.
[0051] Optionally, determining the path change information of the first layout path based on the adjusted size information of the text bounding box includes: determining a path change ratio of the path change information of the first layout path based on a size change ratio of the adjusted text bounding box relative to the size information of the text bounding box before adjustment; and determining a 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.
[0052] Exemplarily, determining the path change ratio of the path change information of the first typesetting 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 typesetting 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 typesetting path.
[0053] Exemplarily, in the case where the first layout path is a path including a straight-line curve segment, when the size information or size change information of the text bounding box reaches 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, in the case where the path change ratio is the radius change ratio, the 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 is determined based on the second radius.
[0054] It should be noted that the size information in one preset direction of the text bounding box can be adjusted separately, and the size information in other directions of the text bounding box remains unchanged; or the size information in other directions of the text bounding box can be adaptively adjusted in equal proportion by adjusting the size information in one preset direction of the text bounding box, that is, equal proportion scaling is achieved.
[0055] For example, as shown in FIG. 1B, the text to be typeset is "Text bending test yydsig", and the first layout path is the arrangement trajectory of these text characters such as text, text, bend, curve, test, y, y, d, s, i, and g, that is, a path including a straight-line curve segment. When the text bounding box (the white rectangle marked in the figure) surrounding the text to be typeset is adjusted, it can be changed to the arc-shaped layout path in FIGS. 1C and 1D, that is, the second layout path. Among them, the bending direction of the arc-shaped layout path can be set in advance or determined according to the change direction of the edge line when the text bounding box is adjusted.
[0056] In the embodiments of the present disclosure, optionally, after the response to the size adjustment trigger operation acting on the text bounding box, it further includes: adjusting the font size and / or character spacing of the text characters in the text to be typeset; adopting this technical solution can achieve adjusting the display information of a single text character through the text bounding box and enriching the adjustment methods of text characters.
[0057] Optionally, in the case of separately adjusting the size information of the text bounding box in the extension direction of the first layout path, the length of the first layout path can be adjusted while keeping the shape of the first layout path unchanged.
[0058] Optionally, in the case of adjusting the size information of the text bounding box in an equal proportion scaling manner, the length of the first layout path can be kept unchanged and the shape of the first layout path can be adjusted to obtain the second layout path.
[0059] In the embodiments of the present disclosure, when adjusting the superimposed layout path through the text bounding box, a richer text layout effect can be achieved.
[0060] S130: Display the text to be typeset in the text editing interface using the second typeset path.
[0061] 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.
[0062] Optionally, after the text to be typeset is typeset using the second typeset 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 typeset is aligned with the text center position or text endpoint position of the text to be processed. 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 typeset path.
[0063] It should be noted that after the text to be typeset is displayed in the text editing interface using the second typesetting path, the display position of the text to be typeset in the text editing interface may be adjusted in response to a position adjustment trigger operation for the text to be typeset. For example, the position adjustment operation may be an operation of dragging the text to be typeset, or a control trigger operation acting on a preset movement direction control.
[0064] It is worth noting that in the disclosed embodiments, the first layout path and / or the second layout path include 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 this arrangement is that it can make the layout path present rich and varied visual effects, supporting more layout methods to meet the diverse layout needs of users.
[0065] The curved path may include a straight path, an arc path, a second-order Bezier curve path, or a Bezier curve path. The first layout path and / or the second layout path may be a single layout path or a layout path composed of multiple curved paths. For example, a right-angle path composed of two straight paths, a groove path, a rectangular path, or a square wave path, or an arch bridge path composed of two straight curved paths connected by an arc path.
[0066] In an embodiment of the present disclosure, after typeset the text to be typeset using the second typesetting path, one or more text display effects may be superimposed to display the typeset text in the text editing interface. The text display effects include, but are not limited to, one or more of a text stroke effect, a text shadow effect, a text glow effect, and a text animation effect.
[0067] The technical solution of the embodiment of the present disclosure 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 after the text to be processed is added; 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, and the typesetting path that meets the user's needs can be accurately obtained through user operation, and some 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 can include one or more curved paths to achieve diversification of typesetting paths and provide users with more choices. It solves the technical problems of poor typesetting effects 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.
[0068] Figure 2 is a flow chart of another text processing method provided by an 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 display of the text to be typeset in the text editing interface using the second typesetting path includes: determining a reference character in the characters to be typeset, determining a 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; using the text characters in the text to be typeset as 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, technical features that are the same or similar to those in the above embodiment will not be repeated here.
[0069] As shown in FIG2 , the method of this embodiment may specifically include the following steps.
[0070] S210 . In response to a text adding trigger operation, display the added text to be processed in a first typesetting path in a text editing interface, wherein the text to be processed includes a plurality of text characters.
[0071] 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.
[0072] S230: 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.
[0073] 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 segment of the curved path that constitutes the second typesetting path. Specifically, the second typesetting path can be parsed to determine each segment of the 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.
[0074] Specifically, determining the reference character among the characters to be typeset may include: determining the first character to be typeset in the text to be typeset, and using the first character to be typeset as the reference character; determining a starting typesetting position of the arc-shaped curve, and using the starting typesetting position as the target typesetting position corresponding to the reference character; or 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.
[0075] The first character to be typeset may be the first character, the last character, a set character (a character determined based on a selection order of text characters, such as the first selected character), or a character located at the center of the text. The starting typesetting position may be the starting position, the center position, the preset curve position, or the ending position of the arc-shaped curve.
[0076] 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.
[0077] Optionally, when the path component curve is a circular arc curve, the text layout length of the text to be typeset in the circular arc curve is determined; based on the character spacing between the characters to be typeset and the center angle of the circular arc curve, the target layout position corresponding to each character to be typeset is 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, the character rotation angle corresponding to each character to be typeset is determined. In the embodiment of the present disclosure, an independent algorithm is set for the circular arc curve, and it is not calculated as a Bezier curve. This can simplify the calculation method and improve typesetting efficiency while ensuring the typesetting effect of the text to be typeset.
[0078] 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".
[0079] In the embodiment of the present disclosure, 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.
[0080] In some scenarios, the length of the path component curve can be preset. Furthermore, the text layout length of the text to be typeset under the reference typesetting path can be compared with the preset curve length of the path component curve, and the smaller length can be used as the text layout length of the text to be typeset in the path component curve.
[0081] Optionally, when the path component curve is an arc-shaped curve, determining the 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 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; 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 computing power space of the electronic device executing the text processing method and improving typesetting efficiency.
[0082] Specifically, 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: using the ratio of the interval arc length to the text typeset length as a 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 component curve and the central angle ratio. Exemplarily, the product of the central angle and the central angle ratio is used as the relative rotation angle of the character to be typeset relative to the reference character.
[0083] Specifically, the target typeset position corresponding to each character to be typeset can be determined based on the text typeset 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 and the center angle between the character to be typeset and the reference character; determining the target typeset position corresponding to the character to be typeset based on the interval arc length and the target typeset position of the reference character in the circular arc curve.
[0084] Considering that when using circular or Bezier curves for typesetting, the typesetting path of the text to be typeset is curved, which may cause overlapping or jumping characters, especially in rich text scenarios. Therefore, by adjusting the circular or Bezier curve or the target typesetting position of the characters to be typeset, the spacing between the characters to be typeset can be increased, thereby solving this problem and achieving a better typesetting effect for the text to be typeset.
[0085] Taking the path composition curve as an arc curve as an example, the method of 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 central 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.
[0086] The bending direction may include bending upward and bending downward. The preset direction may be bending upward and / or bending downward.
[0087] Exemplarily, when the bending direction of the arc-shaped curve is a preset direction, the normal at the target typeset position corresponding to each of the characters to be typeset can be determined first, and then the target typeset position corresponding to each of the characters to be typeset can be adjusted along the normal direction in a direction away from the bending direction according to a preset offset distance.
[0088] 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.
[0089] Optionally, the method of 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.
[0090] 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.
[0091] In some scenarios, the second typeset path may include a Bezier curve, that is, the path component curve includes a Bezier curve. In this case, the target typeset position and character rotation angle corresponding to each character to be typeset is determined based on the path component curve and the target typeset position and character rotation angle corresponding to the reference character, including: when the path component curve is a Bezier curve, the target typeset position and character rotation angle corresponding to the character to be typeset are determined one by one using a Newton interpolation approximation algorithm. The adoption of this technical solution can ensure that the typeset effects of the multiple characters to be typeset fit the trajectory of the Bezier curve and that the character spacing between the characters to be typeset is guaranteed, thereby ensuring the typeset effect of the text to be typeset.
[0092] Specifically, in the case where the path composition curve is a Bezier curve, the target typeset position of the current character to be typeset on the Bezier curve is calculated through the Newton interpolation approximation algorithm based on the target typeset position corresponding to the previous character to be typeset and the character distance between the current character to be typeset, thereby determining the target typeset position corresponding to each character to be typeset one by one.
[0093] 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 it can be a reference reference line determined based on the target typeset position and 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.
[0094] S250: Determine a target typeset text based on the target typeset position and the character rotation angle corresponding to each to-be-typeset character, and render the target typeset text in the text editing interface.
[0095] When the target typesetting position and the character rotation angle corresponding to each of the characters to be typeset in the text to be typeset are determined, each character to be typeset is arranged according to the target typesetting position and the character rotation angle to obtain a target typesetting text. The target typesetting text is then rendered in the text editing interface.
[0096] 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 and a text drawing container corresponding to the target text 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.
[0097] It is understood that rendering the target typeset text also includes related rendering logic, such as texture updates, mesh calculations, and material updates for the target typeset text. Furthermore, animation after-effect processing can also be added to the target typeset text. The specific rendering logic can be implemented based on existing technologies and will not be elaborated here.
[0098] The technical solution of the embodiment of the present disclosure 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 using 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 typeset 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 character 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 typeset effect of the target typeset text obtained after typeset using the second typeset path.
[0099] Figure 3 is a flow chart of another text processing method provided by an 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 the text to be typeset is displayed 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 embodiment are not repeated here.
[0100] As shown in FIG3 , the method of the embodiment of the present disclosure may specifically include the following steps.
[0101] S310: In response to a text adding trigger operation, display the added text to be processed in a first typesetting path in a text editing interface, wherein the text to be processed includes a plurality of text characters.
[0102] 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.
[0103] S330: Display the text to be typeset in the text editing interface using the second typeset path.
[0104] 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.
[0105] 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 using the second typeset path. The background area can be understood as the remaining area of the target area corresponding to the text to be typeset, excluding the text to be typeset.
[0106] In an embodiment 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 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. The preset switching rule may be to switch sequentially according to the arrangement order of multiple colors or to switch randomly between multiple colors.
[0107] Optionally, determining the background area corresponding to the text to be typeset includes: determining a text background frame corresponding to the text to be typeset based on the second typesetting path, so as to use the area surrounded by the text background frame as the background area corresponding to the text to be typeset.
[0108] 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 sub-texts. 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, the text background box corresponding to the text to be typeset is determined in response to a control triggering operation acting on the background box setting control. 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, the flexible setting of the file background box is supported, and user needs can be accurately responded to through simple interactive operations.
[0109] As an optional technical solution of the embodiment of the present disclosure, the path starting point and 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, forming an enclosing 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.
[0110] Based on the above technical solution, the text processing method may further include: in response to a size adjustment operation input to the text background frame, updating the text background frame based on the adjusted size parameters. The size parameters include one or more parameters such as width, length, and scaling. This technical solution enables flexible adjustment of the size of the text background frame to present different interactive effects with the text to be typeset, thereby enriching the display effect of the text to be typeset.
[0111] 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 in a set color, and can highlight the text to be typeset by setting the color of the background area. The color effect of the background area is superimposed on the effect after typeset of the text to be typeset, making the display effect of the text to be typeset more diversified.
[0112] FIG4 is a schematic structural diagram of a text processing device provided by an embodiment of the present disclosure. As shown in FIG4 , the device includes: a text adding module 410 , a typesetting triggering module 420 and a typesetting updating module 430 .
[0113] 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.
[0114] The technical solution of the embodiment of the present disclosure 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 after the text to be processed is added; 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, and the typesetting path that meets the user's needs can be accurately obtained through user operation, and some 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 can include one or more curved paths to achieve diversification of typesetting paths and provide users with more choices. It solves the technical problems of poor typesetting effects 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.
[0115] Based on 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 configured to, in response to a character selection trigger operation input for at least some of the text characters in the text to be processed, use the text consisting of the selected text characters as the text to be typeset; and the typesetting switching unit is configured to, in response to a typesetting switching trigger operation input for the text to be typeset, determine a typesetting path after switching, and use the typesetting path after switching as a second typesetting path corresponding to the text to be typeset.
[0116] On the basis of the above-mentioned optional technical solutions, optionally, the typesetting switching unit is used to: when multiple typesetting path identifiers are displayed on the text editing interface, in response to an identifier selection operation for the typesetting path identifier, determine the preset typesetting path corresponding to the selected typesetting path identifier as the typesetting path after switching; or, in response to a control trigger operation acting on the typesetting switching control, determine the typesetting path after switching 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.
[0117] Based on the above-mentioned 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 configured to display a text bounding box corresponding to the first typesetting path and use the to-be-processed text within the text bounding box as the text to be typeset; and the path determination unit is configured to respond to a size adjustment trigger operation applied to the text bounding box and determine a second typesetting path corresponding to the text to be typeset based on the adjusted size information of the text bounding box.
[0118] On the basis of the above-mentioned optional technical solutions, optionally, the path determination unit is specifically used to: determine the path change information of the first typeset path based on the adjusted size information of the text bounding box, and determine 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 the path composition curve corresponding to the first typeset path.
[0119] Based on the above-mentioned optional technical solutions, optionally, the path determination unit is also used to: adjust the font size and / or character spacing of the text characters in the text to be typeset after responding to the size adjustment trigger operation acting on the text bounding box.
[0120] 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 a reference character in the characters to be typeset, determine a path composition curve corresponding to the second typesetting path, and determine a 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 a 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.
[0121] Based on 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. The text length determination unit is configured to determine the text typesetting length of the text to be typeset in the circular arc curve when the path component curve is a circular arc curve; the typesetting position determination subunit is configured to determine the target typesetting position corresponding to each character to be typeset based on the character spacing between the characters to be typeset and the center angle of the circular arc curve; and the rotation angle determination subunit is configured to determine the 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 circular arc curve.
[0122] Based on the above-mentioned optional technical solutions, optionally, the rotation angle determination subunit is used to: 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 central angle of the circle; determine the relative rotation angle of the character to be typeset relative to the reference character based on the arc length of the interval and the text typeset length, and determine the character rotation angle of the character to be typeset based on the relative rotation angle.
[0123] On the basis of the above-mentioned optional technical solutions, optionally, the text processing device further includes: a character typeset position adjustment module, which is used for, 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 central angle of the circular arc curve, adjusting the target typeset position corresponding to each character to be typeset according to a preset offset distance along a direction deviating from the bending direction when the bending direction of the circular arc curve is a preset direction, and updating the adjusted position of the character to be typeset to the target typeset position corresponding to the character to be typeset.
[0124] On the basis of the above-mentioned optional technical solutions, optionally, the text processing device also includes: a typesetting path adjustment module, which is used to adjust the radius of the circular arc curve corresponding to each line of the sub-text respectively 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 circular arc curve, if the text to be typeset includes multiple lines of sub-text, so as to increase the spacing between the sub-texts, and update the circular arc curve based on the adjusted radius.
[0125] On the basis of the above-mentioned optional technical solutions, optionally, the typesetting information determination unit is used to: when the path composition curve is a Bezier curve, determine the target typesetting position and character rotation angle corresponding to the to-be-typesetted characters one by one by using a Newton interpolation approximation algorithm.
[0126] 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.
[0127] On the basis of the above-mentioned optional technical solutions, optionally, the background color setting module is specifically used to: determine the 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, 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-text.
[0128] The text processing device provided by the embodiments of the present disclosure can execute the text processing method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0129] 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.
[0130] FIG5 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Referring to FIG5 , a schematic diagram of the structure of an electronic device (such as a terminal device or server in FIG5 ) 500 suitable for implementing an embodiment of the present disclosure is shown below. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop 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. The electronic device shown in FIG5 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0131] As shown in FIG5 , 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. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. 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.
[0132] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, 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 FIG5 shows the electronic device 500 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.
[0133] 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 includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the 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 performed.
[0134] 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.
[0135] 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. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0136] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the text processing method provided by the above embodiment is implemented.
[0137] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, 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 that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or convey 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 conveyed using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), or any suitable combination thereof.
[0138] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can 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 later developed network.
[0139] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0140] 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: responds to a text addition trigger operation, and 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; responds to a character typesetting trigger operation input for the text to be processed, and 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; and 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.
[0141] 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 stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the 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).
[0142] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two 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 box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0143] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0144] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and 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 chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0145] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can 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 can 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.
[0146] 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 a 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.
[0147] 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, 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, determining the typesetting path after switching, and taking the typesetting path after switching as the second typesetting path corresponding to the text to be typeset.
[0148] 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.
[0149] 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.
[0150] According to one or more embodiments of the present disclosure, [Example Five] provides the method of Example Four, further including: optionally, determining the second typeset path corresponding to the text to be typeset based on the adjusted size information of the text enclosing box, including: determining the 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 the path composition curve corresponding to the first typeset path.
[0151] 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.
[0152] 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 the 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.
[0153] 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.
[0154] According to one or more embodiments of the present disclosure, [Example Nine] provides the method of Example Eight, 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 central 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 in 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.
[0155] 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 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 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.
[0156] 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.
[0157] 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 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 sub-text.
[0158] According to one or more embodiments of the present disclosure, [Example 13] provides a text processing device, including: a text adding module, for displaying 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, for 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 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, for 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.
[0159] The technical solution of the embodiment of the present disclosure 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 after the text to be processed is added; 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, and the typesetting path that meets the user's needs can be accurately obtained through user operation, and some 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 can include one or more curved paths to achieve diversification of typesetting paths and provide users with more choices. It solves the technical problems of poor typesetting effects 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.
[0160] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. 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 the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0161] 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 have been 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.
[0162] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A text processing method, comprising: 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, wherein 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 comprises: 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, wherein the step of determining the typesetting path after switching in response to the typesetting switching trigger operation comprises: In the case where a plurality of layout path identifiers are displayed on the text editing interface, 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 a 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, wherein 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 comprises: 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, wherein determining the second layout path corresponding to the text to be typeset based on the adjusted size information of the text enclosing box comprises: 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, wherein after the responding to the size adjustment triggering operation acting on the text bounding box, it further comprises: 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, wherein displaying the text to be typeset in the text editing interface using the second typeset path comprises: 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, wherein the step of determining the target typesetting position and character rotation angle corresponding to each of the to-be-typeset characters based on the path composition curve and the target typesetting position and 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, wherein 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-shaped curve, the method further comprises: When the curvature direction of the arc-shaped curve is a preset direction, the target typesetting position corresponding to each of the characters to be typeset is shifted along a direction away from the curvature direction according to a preset offset distance. The line is adjusted to update the adjusted position of the character to be typeset to the target typeset position corresponding to the character to be typeset.
10. The text processing method according to claim 8, wherein 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-shaped curve, the method further comprises: 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, wherein after displaying the text to be typeset in the text editing interface in the second typeset path, further comprising: 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, wherein the step of determining the background area corresponding to the text to be typeset comprises: 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, comprising: 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 respond to a typesetting trigger operation of a character inputted into the text to be processed, Determine a text to be typeset corresponding to the text to be processed and a second typeset 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 comprising: 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 text processing actions, and the actions 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.
15. The electronic device according to claim 14, wherein in response to the character typesetting triggering operation for the text to be processed input, 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 comprises: In response to a character selection trigger input for at least part of the text characters in the text to be processed Operation, 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.
16. The electronic device according to claim 15, wherein in response to the typesetting switching trigger operation, determining the typesetting path after switching comprises: In the case where a plurality of layout path identifiers are displayed on the text editing interface, 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 a 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.
17. The electronic device according to claim 14, wherein in response to the character typesetting triggering operation for the text to be processed input, 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 comprises: 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.
18. The electronic device according to claim 14, wherein displaying the text to be typeset in the text editing interface in the second typeset path comprises: Determine a reference character in the characters to be typeset, and determine a path corresponding to the second typeset path A composition curve is formed, and a target typesetting position and a character rotation angle of the reference character in the path composition curve are determined; 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.
19. The electronic device according to claim 14, wherein after displaying the text to be typeset in the text editing interface in the second typeset path, further comprising: 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.
20. A storage medium containing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to perform text processing actions, the actions comprising: 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.
Citation Information
Patent Citations
Text processing method and device, electronic equipment and storage medium
CN119598968A
Method and system for implementing Uighur linear typeset split joint
CN101404010A
Content typesetting method and mobile terminal
CN103558989A
Method and device for monitoring typesetting software
CN108664369A
Method for typesetting a set glyphs represented as a set of two dimensional distance fields
US20040189643A1
Cited By
Deformed character typesetting rendering method, device and equipment based on path
CN121236228A