CN113506354A - Character rendering method and device and electronic equipment - Google Patents

Character rendering method and device and electronic equipment Download PDF

Info

Publication number
CN113506354A
CN113506354A CN202110873638.6A CN202110873638A CN113506354A CN 113506354 A CN113506354 A CN 113506354A CN 202110873638 A CN202110873638 A CN 202110873638A CN 113506354 A CN113506354 A CN 113506354A
Authority
CN
China
Prior art keywords
configuration information
character
text
function item
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110873638.6A
Other languages
Chinese (zh)
Inventor
黄金
李蕊
汤易
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Zhongnetease Qixiu Technology Co ltd
Beijing Knet Eqxiu Technology Co ltd
Original Assignee
Chengdu Zhongnetease Qixiu Technology Co ltd
Beijing Knet Eqxiu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Zhongnetease Qixiu Technology Co ltd, Beijing Knet Eqxiu Technology Co ltd filed Critical Chengdu Zhongnetease Qixiu Technology Co ltd
Priority to CN202110873638.6A priority Critical patent/CN113506354A/en
Publication of CN113506354A publication Critical patent/CN113506354A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a character rendering method, a device and electronic equipment, wherein the character rendering method comprises the following steps: acquiring an original text component, wherein the text component is used for editing a text; acquiring configuration information aiming at the original text component, and configuring the associated function item of the original text component based on the configuration information to acquire a target text component; and rendering the input characters by using the target character component to obtain rendered character pictures. The method and the device can configure the character component according to actual requirements, so that the actual requirements of character rendering can be met by performing character editing based on the configured target character component, and the definition and the effect of the rendered character picture are improved.

Description

Character rendering method and device and electronic equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for rendering text, and an electronic device.
Background
When characters are edited in the image editor, the text content needs to be edited by the character component and finally rendered to obtain a character image. However, the functions or formats that can be realized in the existing text components are fixed, so that the actual requirements of the user cannot be met when the user performs text rendering by using the text components, and the definition and the effect of the finally generated text images are reduced.
Disclosure of Invention
In order to solve the above problems, the invention provides a method and a device for rendering characters and electronic equipment, which meet the actual requirements of character rendering and improve the definition and effect of rendered character pictures.
In order to achieve the purpose, the invention provides the following technical scheme:
a method of text rendering, comprising:
acquiring an original text component, wherein the text component is used for editing a text;
acquiring configuration information aiming at the original text component, and configuring the associated function item of the original text component based on the configuration information to acquire a target text component;
and rendering the input characters by using the target character component to obtain rendered character pictures.
Optionally, the obtaining configuration information for the original text component includes:
acquiring configuration information of a character format of a character to be input aiming at an original character component;
configuration information for a text entry area of an original text component is obtained.
Optionally, the configuring, based on the configuration information, an associated function item of the original text component includes:
determining a first function item corresponding to the configuration information, and configuring the first function item based on the configuration information, wherein the first function item is a function item directly configured through the configuration information;
determining a second function item associated with the first function item;
and configuring the second function item based on the associated configuration information matched with the configuration information.
Optionally, the configuration information of the text format includes: one or more of character size, character color, character effect, and character font;
the configuration information of the text input area comprises: one or more of the size of the text input box, the shape of the text input box, and the background color of the text input area.
Optionally, the first function item includes a position function item for inputting a cursor, the second function item includes an effect function item for inputting a cursor, the configuration information includes movement information, and configuring the first function item based on the configuration information includes:
determining initial position information of the input cursor;
determining a target position of the input cursor based on the movement information corresponding to the input cursor;
configuring the second function item based on the associated configuration information matched with the configuration information, wherein the configuring the second function item based on the associated configuration information matched with the configuration information comprises:
obtaining canvas characteristic information of a position corresponding to the movement information based on the target position of the input cursor;
and configuring the effect of the input cursor based on the canvas characteristic information, so that the effect of the input cursor is different from the canvas display effect.
Optionally, the configuring the first function item based on the configuration information includes:
configuring the character attribute items based on the character effect configuration information;
configuring the second function item based on the associated configuration information matched with the configuration information, wherein the configuring the second function item based on the associated configuration information matched with the configuration information comprises:
acquiring coordinate information and character effect information of characters configured based on the character attribute items;
determining position information of the text line based on the coordinate information;
determining effect information of the text line based on the text effect information;
and configuring the word line function items according to the position information of the word line and the effect information of the word line.
Optionally, the configuring the first function item based on the configuration information includes:
acquiring parameter information of a character component input area;
and performing alignment setting on the characters of the input area based on the alignment configuration information and the parameter information.
Optionally, the configuring the first function item based on the configuration information includes:
acquiring parameter information of a character input box;
calculating to obtain a fillet curve according to the fillet size parameter and the parameter information of the character input box;
and configuring the round angle function items of the character input box based on the round angle curves to obtain the character input box with round angles.
A text rendering apparatus comprising:
the system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring an original text component which is used for editing the text;
the configuration unit is used for acquiring configuration information aiming at the original text component, and configuring the associated function items of the original text component based on the configuration information to acquire a target text component;
and the rendering unit is used for rendering the input characters by utilizing the target character component to obtain rendered character pictures.
An electronic device, the electronic device comprising:
a memory for storing a program;
a processor configured to execute the program, where the program is specifically configured to implement the text rendering method according to any one of the above-mentioned embodiments.
Compared with the prior art, the invention provides a character rendering method, a device and electronic equipment, wherein the character rendering method comprises the following steps: acquiring an original text component, wherein the text component is used for editing a text; acquiring configuration information aiming at the original text component, and configuring the associated function item of the original text component based on the configuration information to acquire a target text component; and rendering the input characters by using the target character component to obtain rendered character pictures. The method and the device can configure the character component according to actual requirements, so that the actual requirements of character rendering can be met by performing character editing based on the configured target character component, and the definition and the effect of the rendered character picture are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flow chart of a text rendering method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an effect of multi-line character alignment of a character input box according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an input box background and a background rounding effect according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a text component rendering process according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a text rendering apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first" and "second," and the like in the description and claims of the present invention and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not set forth for a listed step or element but may include steps or elements not listed.
The embodiment of the invention provides a character rendering method, which is a lossless rendering method realized by a character component, wherein the character component is a component for editing characters to be input in an image editor. The method realizes the lossless rendering of the character component, and highly restores the design content of the user aiming at the characters.
Referring to fig. 1, a flow diagram of a text rendering method according to an embodiment of the present invention is provided, where the method includes the following steps:
s101, acquiring an original character component.
The text component is one of the core components of the picture editor, and can realize the function of editing the content to be input by the user. The original text component refers to a default text component, that is, a text component having a default style and default attributes, for example, the default configuration information in the original text component may be that the text size may be 12, the text color is black, and the like.
S102, obtaining configuration information aiming at the original text component, and configuring the associated function items of the original component based on the configuration information to obtain the target text component.
The configuration information refers to parameter modification information determined by an operator based on actual needs, and the parameter refers to the need to be updated for the original text component, and may be, for example, font size, font color, and the like.
The function item in the original text component refers to an item capable of implementing a specific function, for example, a font selection button that can implement font color change, a control parameter that can perform font color change, and the like. When the original text component is configured, it is necessary to determine that the associated function item corresponding to the configuration information is configured, and if the configuration information is configured for a font, the associated function item is a configuration item related to the font, and further may be a font color, a font size, a font type, and the like.
It should be noted that, in the embodiment of the present invention, not only the function items on which the configuration information can directly act may be configured according to the configuration information, but also the relevant configuration items may be configured in a matching manner based on the configuration information. If the user configures the font size, the size of the input box can be configured correspondingly according to the font size determined by the user.
After the configuration of the associated function items is completed, a target character component can be obtained, wherein the target character component is a character component capable of meeting the character effect actually input by the user.
S103, rendering the input characters by using the target character component to obtain rendered character pictures.
The input characters are characters to be rendered, can be characters which are being input, and can also be characters which are already input, and then the input characters are rendered according to information such as display formats, display positions, display effects and the like which are specified in the target character component to obtain corresponding character pictures, so that a user can print or post-process the character pictures.
The embodiment of the invention provides a character rendering method, which comprises the following steps: acquiring an original text component, wherein the text component is used for editing a text; acquiring configuration information aiming at the original text component, and configuring the associated function item of the original text component based on the configuration information to acquire a target text component; and rendering the input characters by using the target character component to obtain rendered character pictures. The method and the device can configure the character component according to actual requirements, so that the actual requirements of character rendering can be met by performing character editing based on the configured target character component, and the definition and the effect of the rendered character picture are improved.
In an embodiment of the present invention, the obtaining configuration information for an original text component includes:
acquiring configuration information of a character format of a character to be input aiming at an original character component;
configuration information for a text entry area of an original text component is obtained.
In the embodiment of the invention, not only can the text format of the text be customized, but also the text input area can be configured, wherein the text input area can be a text input box, and correspondingly, the size of the text input box can be adjusted, the input cursor style can be adjusted, and the like, so that the design requirements of a user on the text can be better met based on the configuration information.
Further, the configuration information of the text format includes: one or more of character size, character color, character effect, and character font; the configuration information of the text input area comprises: one or more of the size of the text input box, the shape of the text input box, and the background color of the text input area. It should be noted that the above configuration information of the text format and the configuration information of the text input area are only examples in the embodiment of the present invention, and specifically, the configuration information that is needed for both the text format and the text input area effect in the original text component can be determined according to actual requirements, and as long as the configuration information that changes the text format and the text input area effect in the original text component all belong to the range of the corresponding configuration information.
Correspondingly, the process of configuring the associated function item of the original text component based on the configuration information comprises the following steps:
determining a first function item corresponding to the configuration information, and configuring the first function item based on the configuration information, wherein the first function item is a function item directly configured through the configuration information;
determining a second function item associated with the first function item;
and configuring the second function item based on the associated configuration information matched with the configuration information.
In this embodiment, first, a first function item is determined, where the first function item is a function item that can be configured directly by configuration information, for example, the configuration information is a function item that adjusts the font size of a font to 10, and the first function item refers to a function item of the font size, and specifically may be a button of the font size, or may be a control parameter that can control the font size. The associated configuration information refers to associated configuration information generated when the configuration information is adjusted, for example, when the font size is adjusted according to the font size, the associated configuration information is size adjustment information of the text input box, the corresponding second function item is an associated item of the first function item, and the second function item is a function item corresponding to the text input box.
The embodiments of the present invention will be described below in terms of specific functional items.
In one embodiment, the first function item includes a position function item for inputting a cursor, the second function item includes an effect function item for inputting a cursor, the configuration information includes movement information, and the configuring the first function item based on the configuration information includes:
determining initial position information of the input cursor;
determining a target position of the input cursor based on the movement information corresponding to the input cursor;
configuring the second function item based on the associated configuration information matched with the configuration information, wherein the configuring the second function item based on the associated configuration information matched with the configuration information comprises:
obtaining canvas characteristic information of a position corresponding to the movement information based on the target position of the input cursor;
and configuring the effect of the input cursor based on the canvas characteristic information, so that the effect of the input cursor is different from the canvas display effect.
In the embodiment, the input cursor in the character component is configured, so that the configured input cursor can effectively distinguish the cursor from the canvas background, and the input experience can be optimized. In particular, the configuration of the custom input cursor is realized in the embodiment. For example, first, to determine initial position information of an input cursor, usually, a row of default characters, such as "double-click to edit" is available in a character input region, and after a user double-click operates in the region, the input cursor is positioned at a head position of the region, which is the initial position of the input cursor. Meanwhile, in order to optimize the input effect, the effect of the cursor can be configured according to the corresponding canvas characteristic information, namely the background color corresponding to the current input area, so that the effect of inputting the cursor is different from the canvas display effect. For example, the embodiment of the present invention may implement a cursor with a frame style and a projection by customizing the cursor, and calculate the cursor position according to the position of each character on the canvas and the mouse click event or the keyboard up, down, left, and right input events, so as to implement the feature that the cursor moves the characters with the corresponding number of lines in the corresponding direction. Further, if the input area background is black and the cursor is also black by default, the cursor cannot be distinguished and can be set to a color that can be clearly distinguished from black.
In another embodiment of the present invention, the first function item includes a text attribute item to be input, the second function item includes a text line function item, the configuration information includes text effect configuration information, and configuring the first function item based on the configuration information includes:
configuring the character attribute items based on the character effect configuration information;
configuring the second function item based on the associated configuration information matched with the configuration information, wherein the configuring the second function item based on the associated configuration information matched with the configuration information comprises:
acquiring coordinate information and character effect information of characters configured based on the character attribute items;
determining position information of the text line based on the coordinate information;
determining effect information of the text line based on the text effect information;
and configuring the word line function items according to the position information of the word line and the effect information of the word line.
The text line function items in this embodiment include text underlines, dashes, and the like. Firstly, configuring the character attribute items according to character effect configuration information, wherein the character effect configuration information can be information such as character size, font, color and the like. After the word lines are configured, configuration information of corresponding word lines can be determined, and the configuration information mainly comprises word line effect information, position information of the word lines and the like. For example, when an underline is configured, an SVG (Scalable Vector Graphics) path corresponding to the number of characters is created according to the selected characters, the width, height and coordinates of the characters are acquired, underline path coordinates are calculated, wherein the X coordinate is the same as the X coordinate of the characters, the Y coordinate is the Y coordinate of the characters plus the height of a single character, then path color and path thickness are set, and finally a path is added to a character component structure. The middle-underlined realization differs from the underlining only in the value of the Y coordinate in the text Y coordinate plus the text height minus the path height 1/2. Different character colors and underline/middle-line colors can be set through the configuration of the character lines, and underline/middle-line effects can be set for single character contents.
In another embodiment of the present invention, the configuring the first function item based on the configuration information includes:
acquiring parameter information of a character component input area;
and performing alignment setting on the characters of the input area based on the alignment configuration information and the parameter information.
In this embodiment, a multi-line text alignment effect of setting the input area is achieved. The adoption number information of the character component input area is the coordinates, width and height, inner side distance and row distance of an input box of the input area. Referring to fig. 2, a schematic diagram illustrating an effect of multi-line text alignment of a text input box according to an embodiment of the present invention is shown. The two ends of the characters are aligned for illustration, the number of the characters in each row in the input box and the width of the characters are obtained, and the equal character spacing is obtained by subtracting the inner edge spacing from the width of the box and dividing by the number of the characters; and circularly calculating the X coordinate of each character in the line, wherein the current character coordinate is equal to the sum of the width and the space between characters positioned at the left side of the character. Thereby realizing the effect of two-end dispersion alignment in the real sense.
In another embodiment of the present invention, the configuring the first function item based on the configuration information includes:
acquiring parameter information of a character input box;
calculating to obtain a fillet curve according to the fillet size parameter and the parameter information of the character input box;
and configuring the round angle function items of the character input box based on the round angle curves to obtain the character input box with round angles.
In this embodiment, a process of configuring a format of a frame corresponding to the text input area is implemented, where the parameter information of the text input frame may include parameters such as a corresponding width, a height, an inner distance, and an outer frame. For example, referring to fig. 3, which shows a schematic diagram of an input box background and a background fillet effect provided by an embodiment of the present invention, a background of a general input box is transparent, and a border is rectangular, but in the embodiment of the present invention, the background may be set in other colors, such as gray as shown in fig. 3, and a fillet may be included in the border. For example, firstly, the coordinates and width and height of each character of the input box are obtained, an SVG path with the same coordinates and width and height is set as a background corresponding to a single character, and the fillet effect is specifically realized: the width and the height of the character component, the inner edge distance and the outer frame are obtained, then path calculation is carried out according to the required fillet size, and a fillet curve effect is drawn through an SVG (scalable vector graphics) straight line command and an arc command. In the embodiment, a single character background and a round corner function can be realized, and the round corner effect is not limited in a limiting value.
Besides the configuration of each function item, the size of the text can be set in the embodiment of the present invention, for example, the size of less than 12 pixels can be displayed by zooming the visual range of the svg viewbox; vector scaling, no distortion is caused. Correspondingly, the embodiment of the invention adds a single character rendering structure, realizes the function of independently editing the style of partial character contents, enhances the expansibility and consumes less resources when rendering a large object to the interface. Wherein a large object refers to a text component structure presented on the image editor canvas. Furthermore, the input object can be configured, namely, the input of special characters is supported, for example, the expression input can be realized, and the expression input can be performed by selecting a custom area.
In the embodiment of the invention, by initializing a Scalable Vector Graphics (SVG) text component, adding default styles and default attributes to the SVG text component, initializing a container framework (comprising a hidden layer, an outer layer, a text grouping layer, a text layer, a background layer, a decoration layer and a selected middle layer), and realizing the styles and attributes one by one according to the text styles and attributes set by the actual operation of a user to finally obtain a text component. Because SVG rendering is adopted, the purpose of highly restoring user design is achieved, and compared with other text component implementation modes, lossless and non-fuzzy are achieved.
Referring to fig. 4, a schematic diagram of a text component rendering flow provided by an embodiment of the present invention is shown. The method mainly comprises the processes of initialization, skeleton building, style filling, attribute filling and the like. The method specifically comprises the following steps:
and responding to the received character rendering instruction, acquiring default styles and attribute information, then creating a container skeleton, and loading fonts. And then performing initial width and height rendering, character style data setting, character attribute data setting, single character width and height calculation, text line division calculation, container width and height updating, text content rendering and text decoration rendering (including underlining/middle-lining). Rendering text attributes (including projection/stereo/stroking), rendering text backgrounds (including colors, gradual changes, patterns and the like), and finishing the rendering.
It should be noted that the specific configuration process can be referred to the foregoing embodiments of the present invention, and is not described in detail herein.
Referring to fig. 5, a schematic structural diagram of a text rendering apparatus according to an embodiment of the present invention is shown, where the apparatus includes:
an obtaining unit 10, configured to obtain an original text component, where the text component is used to edit a text;
a configuration unit 20, configured to obtain configuration information for the original text component, and configure an associated function item of the original text component based on the configuration information to obtain a target text component;
and the rendering unit 30 is configured to render the input text by using the target text component, so as to obtain a rendered text image.
Further, the acquisition unit includes:
the first acquisition subunit is used for acquiring the configuration information of the character format of the character to be input aiming at the original character component;
and the second acquisition subunit is used for acquiring the configuration information of the character input area aiming at the original character assembly.
Optionally, the configuration unit includes:
a first configuration subunit, configured to determine a first function item corresponding to the configuration information, and configure the first function item based on the configuration information, where the first function item is a function item directly configured through the configuration information;
a first determining subunit for determining a second function item associated with the first function item;
and the second configuration subunit is used for configuring the second function item based on the associated configuration information matched with the configuration information.
Further, the configuration information of the text format includes: one or more of character size, character color, character effect, and character font;
the configuration information of the text input area comprises: one or more of the size of the text input box, the shape of the text input box, and the background color of the text input area.
When the first function item includes a position function item for inputting a cursor, the second function item includes an effect function item for inputting a cursor, and the configuration information includes movement information, the first configuration subunit is specifically configured to:
determining initial position information of the input cursor;
determining a target position of the input cursor based on the movement information corresponding to the input cursor;
wherein the second configuration subunit is specifically configured to:
obtaining canvas characteristic information of a position corresponding to the movement information based on the target position of the input cursor;
and configuring the effect of the input cursor based on the canvas characteristic information, so that the effect of the input cursor is different from the canvas display effect.
When the first function item includes a text attribute item to be input, the second function item includes a text line function item, and the configuration information includes text effect configuration information, the first configuration subunit is specifically configured to:
configuring the character attribute items based on the character effect configuration information;
wherein the second configuration subunit is specifically configured to:
acquiring coordinate information and character effect information of characters configured based on the character attribute items;
determining position information of the text line based on the coordinate information;
determining effect information of the text line based on the text effect information;
and configuring the word line function items according to the position information of the word line and the effect information of the word line.
Optionally, when the first function item includes a text alignment function item and the configuration information includes alignment configuration information, the first configuration subunit is specifically configured to include:
acquiring parameter information of a character component input area;
and performing alignment setting on the characters of the input area based on the alignment configuration information and the parameter information.
Optionally, when the first function item includes a text input box fillet function item, the configuration information includes a fillet size parameter, and the first configuration subunit is specifically configured to:
acquiring parameter information of a character input box;
calculating to obtain a fillet curve according to the fillet size parameter and the parameter information of the character input box;
and configuring the round angle function items of the character input box based on the round angle curves to obtain the character input box with round angles.
The embodiment of the invention provides a character rendering device.A obtaining unit obtains an original character component, and the character component is used for editing characters; the configuration unit acquires configuration information aiming at the original text component, and configures the associated function items of the original text component based on the configuration information to acquire a target text component; and the rendering unit renders the input characters by utilizing the target character component to obtain rendered character pictures. The method and the device can configure the character component according to actual requirements, so that the actual requirements of character rendering can be met by performing character editing based on the configured target character component, and the definition and the effect of the rendered character picture are improved.
An embodiment of the present invention further provides an electronic device, including: a memory for storing a program; a processor configured to execute the program, where the program is specifically configured to implement the text rendering method according to any one of the above-mentioned embodiments.
Please refer to the description of the text rendering method in the foregoing embodiments, which is not described in detail herein, corresponding to the program executable by the processor in the electronic device.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of rendering text, comprising:
acquiring an original text component, wherein the text component is used for editing a text;
acquiring configuration information aiming at the original text component, and configuring the associated function item of the original text component based on the configuration information to acquire a target text component;
and rendering the input characters by using the target character component to obtain rendered character pictures.
2. The method of claim 1, wherein obtaining configuration information for an original text component comprises:
acquiring configuration information of a character format of a character to be input aiming at an original character component;
configuration information for a text entry area of an original text component is obtained.
3. The method of claim 1, wherein configuring associated function items of an original text component based on the configuration information comprises:
determining a first function item corresponding to the configuration information, and configuring the first function item based on the configuration information, wherein the first function item is a function item directly configured through the configuration information;
determining a second function item associated with the first function item;
and configuring the second function item based on the associated configuration information matched with the configuration information.
4. The method of claim 2, wherein the configuration information in text format comprises: one or more of character size, character color, character effect, and character font;
the configuration information of the text input area comprises: one or more of the size of the text input box, the shape of the text input box, and the background color of the text input area.
5. The method of claim 3, wherein the first function item comprises a position function item for inputting a cursor, the second function item comprises an effect function item for inputting a cursor, the configuration information comprises movement information, and the configuring the first function item based on the configuration information comprises:
determining initial position information of the input cursor;
determining a target position of the input cursor based on the movement information corresponding to the input cursor;
configuring the second function item based on the associated configuration information matched with the configuration information, wherein the configuring the second function item based on the associated configuration information matched with the configuration information comprises:
obtaining canvas characteristic information of a position corresponding to the movement information based on the target position of the input cursor;
and configuring the effect of the input cursor based on the canvas characteristic information, so that the effect of the input cursor is different from the canvas display effect.
6. The method of claim 3, wherein the first function item comprises a text attribute item to be input, the second function item comprises a text line function item, the configuration information comprises text effect configuration information, and configuring the first function item based on the configuration information comprises:
configuring the character attribute items based on the character effect configuration information;
configuring the second function item based on the associated configuration information matched with the configuration information, wherein the configuring the second function item based on the associated configuration information matched with the configuration information comprises:
acquiring coordinate information and character effect information of characters configured based on the character attribute items;
determining position information of the text line based on the coordinate information;
determining effect information of the text line based on the text effect information;
and configuring the word line function items according to the position information of the word line and the effect information of the word line.
7. The method of claim 3, wherein the first function item comprises a text alignment function item, wherein the configuration information comprises alignment configuration information, and wherein configuring the first function item based on the configuration information comprises:
acquiring parameter information of a character component input area;
and performing alignment setting on the characters of the input area based on the alignment configuration information and the parameter information.
8. The method of claim 3, wherein the first function item comprises a text input box fillet function item, wherein the configuration information comprises a fillet size parameter, and wherein configuring the first function item based on the configuration information comprises:
acquiring parameter information of a character input box;
calculating to obtain a fillet curve according to the fillet size parameter and the parameter information of the character input box;
and configuring the round angle function items of the character input box based on the round angle curves to obtain the character input box with round angles.
9. A text rendering apparatus, comprising:
the system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring an original text component which is used for editing the text;
the configuration unit is used for acquiring configuration information aiming at the original text component, and configuring the associated function items of the original text component based on the configuration information to acquire a target text component;
and the rendering unit is used for rendering the input characters by utilizing the target character component to obtain rendered character pictures.
10. An electronic device, characterized in that the electronic device comprises:
a memory for storing a program;
a processor for executing the program, the program being particularly for implementing the text rendering method of any one of claims 1-8.
CN202110873638.6A 2021-07-30 2021-07-30 Character rendering method and device and electronic equipment Pending CN113506354A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110873638.6A CN113506354A (en) 2021-07-30 2021-07-30 Character rendering method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110873638.6A CN113506354A (en) 2021-07-30 2021-07-30 Character rendering method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113506354A true CN113506354A (en) 2021-10-15

Family

ID=78014673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110873638.6A Pending CN113506354A (en) 2021-07-30 2021-07-30 Character rendering method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113506354A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348462A (en) * 2022-05-10 2022-11-15 北京达佳互联信息技术有限公司 Configuration method, device, equipment, storage medium and communication system of special effect data

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09171378A (en) * 1995-12-20 1997-06-30 Sharp Corp Information processor
US6486894B1 (en) * 1999-11-18 2002-11-26 International Business Machines Corporation Contrasting graphical user interface pointer
CN103543908A (en) * 2013-09-29 2014-01-29 Tcl集团股份有限公司 Method and device for displaying mouse color based on background color
CN108920241A (en) * 2018-06-29 2018-11-30 阿里巴巴集团控股有限公司 A kind of display state adjustment method, device and equipment
CN110968991A (en) * 2018-09-28 2020-04-07 北京国双科技有限公司 Method and related device for editing characters
CN111611771A (en) * 2020-04-28 2020-09-01 维沃移动通信有限公司 Font file processing method, electronic device and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09171378A (en) * 1995-12-20 1997-06-30 Sharp Corp Information processor
US6486894B1 (en) * 1999-11-18 2002-11-26 International Business Machines Corporation Contrasting graphical user interface pointer
CN103543908A (en) * 2013-09-29 2014-01-29 Tcl集团股份有限公司 Method and device for displaying mouse color based on background color
CN108920241A (en) * 2018-06-29 2018-11-30 阿里巴巴集团控股有限公司 A kind of display state adjustment method, device and equipment
CN110968991A (en) * 2018-09-28 2020-04-07 北京国双科技有限公司 Method and related device for editing characters
CN111611771A (en) * 2020-04-28 2020-09-01 维沃移动通信有限公司 Font file processing method, electronic device and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348462A (en) * 2022-05-10 2022-11-15 北京达佳互联信息技术有限公司 Configuration method, device, equipment, storage medium and communication system of special effect data
CN115348462B (en) * 2022-05-10 2024-05-07 北京达佳互联信息技术有限公司 Method, device, equipment, storage medium and communication system for configuring special effect data

Similar Documents

Publication Publication Date Title
EP3220249B1 (en) Method, device and terminal for implementing regional screen capture
EP0635808B1 (en) Method and apparatus for operating on the model data structure on an image to produce human perceptible output in the context of the image
US11049307B2 (en) Transferring vector style properties to a vector artwork
CA2124604C (en) Method and apparatus for operating on an object-based model data structure to produce a second image in the spatial context of a first image
US7636097B1 (en) Methods and apparatus for tracing image data
JP4748980B2 (en) System and method for annotating 3D electronic documents
CN107133615B (en) Information processing apparatus, information processing method, and computer program
CN106447756B (en) Method and system for generating user-customized computer-generated animations
US20160005203A1 (en) Information processing apparatus, information processing method, and storage medium
CN113313027A (en) Image processing method, image processing device, electronic equipment and storage medium
CN113506354A (en) Character rendering method and device and electronic equipment
JP2016200860A (en) Information processing apparatus, control method thereof, and program
CN111724455A (en) Image processing method and electronic device
EP0749099B1 (en) Blend control system
US10802664B2 (en) Dynamic layout design
US9905030B2 (en) Image processing device, image processing method, information storage medium, and program
US20150277676A1 (en) Creating an interaction area for listing user-selectable items
EP4068214A1 (en) Theme icon generation method and apparatus therefor, and computer device
US12001671B2 (en) Electronic whiteboard system and operation method thereof
JP2018019212A (en) Information processing apparatus, drawing processing method, and computer program
CN111047666B (en) Unified digital content selection system for vector graphics and grid graphics
US20240143158A1 (en) Electronic whiteboard system and operation method thereof
CN115700450A (en) Control method and device for whiteboard application and intelligent interactive panel
JP6452329B2 (en) Information processing apparatus, information processing method, and program
CN118170298A (en) Wallpaper display method and device and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination