CN114861595B - Vector line transformation-based individual font generation method - Google Patents
Vector line transformation-based individual font generation method Download PDFInfo
- Publication number
- CN114861595B CN114861595B CN202210287228.8A CN202210287228A CN114861595B CN 114861595 B CN114861595 B CN 114861595B CN 202210287228 A CN202210287228 A CN 202210287228A CN 114861595 B CN114861595 B CN 114861595B
- Authority
- CN
- China
- Prior art keywords
- font
- vector
- command
- straight line
- bezier curve
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
- G06F40/109—Font handling; Temporal or kinetic typography
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/34—Browsing; Visualisation therefor
- G06F16/345—Summarisation for human users
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/56—Information retrieval; Database structures therefor; File system structures therefor of still image data having vectorial format
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/203—Drawing of straight lines or curves
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Bioethics (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The invention discloses a method for generating an individual font based on vector line transformation, which belongs to the technical field of image processing and is characterized by comprising the following steps of: a. deriving a vector font; b. carrying out summary algorithm processing through SM3 algorithm, extracting information summary from information provided by a user, and changing the information summary into a sequence with fixed length; c. abstract preprocessing, including abstract character string conversion and coding partition; d. font transformation, namely, each font is composed of a straight line and a high-order Bezier curve, and a vector picture with a suffix name of svg is processed by changing the straight line into the curve and adjusting the position of a control point of the high-order Bezier curve; e. and importing the vector word stock to obtain a personalized word stock. The method and the device can simply and quickly generate the personalized fonts suitable for different application scenes, can realize simple identity authentication on the document, and have good applicability.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to a method for generating an individual font based on vector line transformation.
Background
In the existing personalized character library manufacturing method, wang Lun provides a personalized artistic font library generating method in a personalized artistic font library generating method, 180 Chinese characters handwritten by a user are scanned and stored in a gray image, after binarization, thinning, smoothing and normalization, font image processing is converted into normalized binary digital dot matrix data, 352 character construction components are extracted from a core Chinese character library, and automatic generation of the Chinese characters can be realized through translation, scaling and rotation components.
Liu Chengdong, lian Zhouhui in the "high-quality Chinese character library automatic generation system based on component splicing", the user needs to write 775 Chinese characters and divide the written Chinese characters into several parts according to the reference characters. And zooming and splicing the parts according to the relation among the Chinese character components to obtain a complete picture of the Chinese character. Due to the deficiency of the skeleton extraction algorithm, when the scaling of the components is too large during the stitching process, distortion may be generated at the intersection and end of the stroke.
Song Chunxiao in "construction and optimization of personalized word stock based on strokes and structural information of Chinese characters", it is proposed to perform multiple feature extraction on a track point set of handwritten Chinese characters, perform structural feature division and extraction on an input Chinese character set of a user, and perform verification analysis of writing style classification on multi-feature data based on machine learning. And then, establishing a stroke situation based on the input example characters, and endowing the optimized structural characteristics and the situation to a basic characteristic word library so as to generate a final personalized characteristic word library. Most of the researches are researches on the generation model of the handwritten Chinese characters.
The character library is divided into a dot matrix character library and a vector character library, the dot matrix character library is usually used as a display character library, and the dot matrix character library has the biggest defect that Chinese characters cannot be amplified, and once the Chinese characters are amplified, sawteeth on the edges of the characters can be found. The vector word stock stores description information for each Chinese character, such as the start or end coordinates, radius or radian of a stroke. When displaying or printing the character library, the result can be output through a series of mathematical operations, but the Chinese characters stored in the character library can be amplified infinitely theoretically, the stroke contour can still be kept smooth, and the character libraries used in printing are all the character libraries. When processing fonts, vector font processing is more convenient and accurate than dot matrix fonts. Because the designed font often needs to be zoomed, stretched and rotated at will, the common dot matrix font can have saw teeth, and the occupied space is increased in proportion as the font becomes larger. Each character in the vector font is characterized by a mathematical curve, and the font is based on an outline technology. The vector font is characterized by Bezier curve segments, and comprises anchor points on the outline of the character and derivative information of connecting lines of the anchor points, and the font renders each character by reading the mathematical information and performing specific vector operation, so that the font can be arbitrarily scaled and kept smooth, the font does not deform or change color, and the storage space does not change no matter how large the character is. The prior art still has no proper algorithm to realize the generation of the vector font.
Chinese patent documents with publication numbers of CN112784531A and publication dates of 2021, 05 and 11 disclose a Chinese character pattern generation method based on deep learning and component splicing, and Chinese character patterns in a target word stock are structurally split to obtain basic vector components for recombination; predicting the layout of the character pattern to be generated according to the layout of the Chinese character pattern in the target character library, and splicing the basic vector components to generate a new vector character pattern;
the Chinese font generation method comprises an offline processing process and an online processing process;
the offline processing process processes fonts of an existing word stock to obtain training data and a reference template, and comprises the steps A-D;
the on-line processing process adopts a component splicing method to generate a complete Chinese vector font aiming at a target font library containing a small number of specific Chinese character fonts at will, and comprises the steps of E-I;
A. performing stroke category marking on Chinese character patterns in a word stock to obtain stroke categories;
B. extracting components of Chinese character patterns in a character library, and combining marked strokes of each Chinese character pattern to obtain different basic vector components; extracting the characteristics of each combined component, and obtaining the component category through clustering;
C. selecting corresponding Chinese characters according to the component categories to form a final input character set;
D. carrying out component splitting processing on Chinese character patterns in an existing character library to obtain an input data set for model pre-training;
E. acquiring partial vector Chinese character font of a target font library, wherein characters of the font correspond to characters in an input character set;
F. e, carrying out component splitting and extraction on the Chinese character patterns obtained in the step E to form basic components for splicing; the splitting comprises splitting at an image level and splitting of vector fonts;
G. constructing a frame structure prediction model, and predicting a frame structure of a font corresponding to a character which is not in the input character set;
H. selecting components from the split components obtained in the step F by using the part frame structure prediction model trained in the step G, and placing the components in a prediction surrounding frame to realize spelling and font generation;
I. and generating a vector curve depicting word stock TTF to realize Chinese font generation based on deep learning and part splicing.
The method for generating Chinese character patterns and character libraries based on deep learning and part splicing disclosed by the patent document can automatically generate a set of complete high-quality Chinese vector character libraries which can be used practically according to a small number of designed vector Chinese character patterns. However, the method cannot simply and quickly generate the personalized fonts suitable for different application scenes, and is not good in applicability.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a vector line transformation-based personalized font generation method, which can simply and quickly generate personalized fonts suitable for different application scenes, can realize simple identity authentication on documents and has good applicability.
The invention is realized by the following technical scheme:
a method for generating an individual font based on vector line transformation is characterized by comprising the following steps:
a. exporting vector fonts, and exporting the fonts in a vector font library by adopting Fontforge software;
b. carrying out summary algorithm processing through SM3 algorithm, extracting information summary from information provided by a user, and changing the information summary into a sequence with fixed length;
c. abstract preprocessing, including abstract character string conversion and coding partition;
d. font transformation, namely, each font is composed of a straight line and a high-order Bezier curve, and a vector picture with a suffix name of svg is processed by changing the straight line into the curve and adjusting the position of a control point of the high-order Bezier curve;
e. and (4) importing a vector font library, and importing the font after font conversion processing into the vector font library by adopting Fontforge software to obtain a personalized font library.
In the step a, deriving the fonts in the vector font library by using fontford software specifically means that all fonts in the vector font library are derived into svg vector pictures by using an API function in the fontford software.
In the step c, the summary character string conversion specifically refers to converting the summary character string into a two-dimensional decimal list.
In the step c, the encoding partition specifically means that different characters ch are partitioned into i = unicode (ch)% n, where n is the number of columns of the list, and the character in the encoding partition i takes the contents in the i-th, i +1, and i +2 indexes in the list as parameters to perform font conversion.
In the step d, the font transformation specifically includes:
q, commanding to add information and drawing a second-order Bezier curve;
h, commanding to add information and converting the straight line into a second-order Bezier curve;
the v command adds information, when f is more than 8, the v command converts the straight line into a third-order Bezier curve, and when f is less than 8, the v command converts the straight line into a second-order Bezier curve;
l, commanding to add information and converting a straight line into a second-order Bezier curve;
the q command is a command for drawing a Bezier curve;
the h command is a command for drawing a horizontal straight line;
the v command is a command for drawing a vertical straight line;
the l command is a drawing straight line command;
the f is a number extracted at a fixed position in l i st.
In the step e, the font after font conversion is introduced into the vector font library by using fontform software, specifically, the font conversion is performed by extracting font paths in all font svg format picture path tags by using an API function in the fontform software.
The SM3 algorithm is a cryptographic hash algorithm.
The fontford software disclosed by the invention is font editing software.
The API function refers to an application programming interface function.
The svg of the invention refers to a graphic file format.
The l i st is a class in a class library in a programming language, and refers to a bidirectional link serial for managing an object set in a linear row mode.
The beneficial effects of the invention are mainly shown in the following aspects:
1. according to the method, a, vector fonts are exported, font types in a vector font library are exported by fontford software; b. carrying out summary algorithm processing through SM3 algorithm, extracting information summary from information provided by a user, and changing the information summary into a sequence with fixed length; c. abstract preprocessing, including abstract character string conversion and coding partition; d. the method comprises the following steps of font transformation, wherein each font is composed of a straight line and a high-order Bezier curve, and a vector picture with a suffix name of svg is processed by changing the straight line into the curve and adjusting the position of a control point of the high-order Bezier curve; e. and importing the vector font library, and importing the font after font conversion processing into the vector font library by using FontForge software to obtain a personalized font library, wherein compared with the prior art, the personalized font can be simply and quickly generated to adapt to different application scenes, and the simple identity authentication of the document can be realized on the basis of the SM3 algorithm, so that the personalized font library has good applicability.
2. The font generation is simple and quick, and a user can finish the generation, installation and document writing and operation by using the font in a webpage or a word plug-in.
3. According to the invention, font generation can support the fact, and the user can input different events and related description to obtain personalized fonts by processing the identity certificate in the face of different application scenes, wherein the fonts not only represent the identity of the user, but also can embody the uniqueness of font application by adding different scenes.
4. According to the invention, based on the unidirectional property of the SM3 algorithm, different parameter lists can be generated for different inputs to determine the uniqueness of the personalized font for the input of the user, the user can perform first re-verification on the document source through visual presentation based on the personalized font, and the font can provide basic anti-repudiation capability, thereby enhancing the safety.
5. In the invention, when the font is changed, the public key used for encrypting the font only uses the identity information and can be added with other information for inputting together, and the same user can also add other different information to generate more personalized fonts, thereby not only enabling the expression form of the text to be more vivid and rich, but also enabling the emotion and the personality behind the text to be transmitted in a visual form and enhancing the experience.
Drawings
The invention will be further described in detail with reference to the drawings and the detailed description, wherein:
FIG. 1 is a block flow diagram of the present invention;
FIG. 2 is a diagram of font glyphs before the "Rong" word is algorithmically processed in an example;
FIG. 3 is a diagram of font glyphs after algorithmic processing of a "Rong" word in an example.
Detailed Description
Example 1
Referring to fig. 1, a method for generating an individual font based on vector line transformation includes the following steps:
a. exporting vector fonts, and exporting the fonts in a vector font library by adopting Fontforge software;
b. carrying out summary algorithm processing through SM3 algorithm, extracting information summary from information provided by a user, and changing the information summary into a sequence with fixed length;
c. abstract preprocessing, including abstract character string conversion and coding partition;
d. font transformation, namely, each font is composed of a straight line and a high-order Bezier curve, and a vector picture with a suffix name of svg is processed by changing the straight line into the curve and adjusting the position of a control point of the high-order Bezier curve;
e. and (4) importing a vector font library, and importing the font after font conversion processing into the vector font library by adopting Fontforge software to obtain a personalized font library.
The embodiment is the most basic implementation manner, and compared with the prior art, the method can simply and quickly generate the personalized fonts suitable for different application scenes, and because the method is based on the SM3 algorithm, the method can realize simple identity authentication on the document, and has good applicability.
Example 2
Referring to fig. 1, a method for generating a personalized font based on vector line transformation includes the following steps:
a. exporting vector fonts, and exporting the fonts in the vector font library by using fontford software;
b. carrying out summary algorithm processing through SM3 algorithm, extracting information summary from information provided by a user, and changing the information summary into a sequence with fixed length;
c. abstract preprocessing, including abstract character string conversion and coding partition;
d. the method comprises the following steps of font transformation, wherein each font is composed of a straight line and a high-order Bezier curve, and a vector picture with a suffix name of svg is processed by changing the straight line into the curve and adjusting the position of a control point of the high-order Bezier curve;
e. and (5) introducing a vector word stock, and introducing the font after font conversion processing into the vector word stock by using fontford software to obtain a personalized word stock.
In the step a, deriving the fonts in the vector font library by using fontford software specifically means that all fonts in the vector font library are derived into svg vector pictures by using an API function in the fontford software.
The embodiment is a better implementation mode, the font generation is simple and quick, and a user can complete the generation, installation and document writing and operation by using the font in a webpage or a word plug-in.
Example 3
Referring to fig. 1, a method for generating a personalized font based on vector line transformation includes the following steps:
a. exporting vector fonts, and exporting the fonts in a vector font library by adopting Fontforge software;
b. carrying out summary algorithm processing through SM3 algorithm, extracting information summary from information provided by a user, and changing the information summary into a sequence with fixed length;
c. abstract preprocessing, including abstract character string conversion and coding partition;
d. font transformation, namely, each font is composed of a straight line and a high-order Bezier curve, and a vector picture with a suffix name of svg is processed by changing the straight line into the curve and adjusting the position of a control point of the high-order Bezier curve;
e. and (4) importing a vector font library, and importing the font after font conversion processing into the vector font library by adopting Fontforge software to obtain a personalized font library.
In the step a, deriving the fonts in the vector font library by using fontford software specifically means that all fonts in the vector font library are derived into svg vector pictures by using an API function in the fontford software.
In the step c, the summary character string conversion specifically refers to converting the summary character string into a two-dimensional decimal list.
In the step c, the encoding partition specifically means that different characters ch are partitioned into i = unicode (ch)% n, where n is the number of columns of the list, and the character in the encoding partition i takes the content in the i, i +1, and i +2 indexes in the list as parameters to perform font conversion.
In another preferred embodiment, the font generation may support an integration, and in the face of different application scenarios, the user may further input different events and related descriptions to obtain personalized fonts by processing the identity certificate, where the fonts not only represent the user identity, but also can reflect the uniqueness of the font application by adding different scenarios.
Example 4
Referring to fig. 1, a method for generating a personalized font based on vector line transformation includes the following steps:
a. exporting vector fonts, and exporting the fonts in a vector font library by adopting Fontforge software;
b. carrying out summary algorithm processing through SM3 algorithm, extracting information summary from information provided by a user, and changing the information summary into a sequence with fixed length;
c. abstract preprocessing, including abstract character string conversion and coding partition;
d. font transformation, namely, each font is composed of a straight line and a high-order Bezier curve, and a vector picture with a suffix name of svg is processed by changing the straight line into the curve and adjusting the position of a control point of the high-order Bezier curve;
e. and (5) introducing a vector word stock, and introducing the font after font conversion processing into the vector word stock by using fontford software to obtain a personalized word stock.
In the step a, exporting the font in the vector font library by using fontform software specifically means exporting all fonts in the vector font library as svg vector pictures by using an API function in the fontform software.
In the step c, the summary character string conversion specifically refers to converting the summary character string into a two-dimensional decimal list.
In the step c, the encoding partition specifically means that different characters ch are partitioned into i = unicode (ch)% n, where n is the number of columns of the list, and the character in the encoding partition i takes the content in the i, i +1, and i +2 indexes in the list as parameters to perform font conversion.
In step d, the font transformation specifically includes:
q commanding to add information and drawing a second-order Bezier curve;
h, commanding to add information and converting the straight line into a second-order Bezier curve;
the v command adds information, when f is more than 8, the v command converts the straight line into a third-order Bezier curve, and when f is less than 8, the v command converts the straight line into a second-order Bezier curve;
l, commanding to add information and converting a straight line into a second-order Bezier curve;
the q command is a command for drawing a Bezier curve;
the h command is a command for drawing a horizontal straight line;
the v command is a command for drawing a vertical straight line;
the l command is a drawing straight line command;
the f is a number extracted from a fixed location in the list.
This embodiment is a further preferred embodiment, based on the unidirectional property of the SM3 algorithm, different parameter lists are generated for different inputs to determine the uniqueness of the personalized font with respect to the user input, the user can perform the first re-verification of the document source through visual presentation based on the personalized font, and the font can provide the basic anti-repudiation capability, which enhances the security.
Example 5
Referring to fig. 1 to 3, a method for generating a personalized font based on vector line transformation includes the following steps:
a. exporting vector fonts, and exporting the fonts in a vector font library by adopting Fontforge software;
b. carrying out summary algorithm processing through SM3 algorithm, extracting information summary from information provided by a user, and changing the information summary into a sequence with fixed length;
c. abstract preprocessing, including abstract character string conversion and coding partition;
d. font transformation, namely, each font is composed of a straight line and a high-order Bezier curve, and a vector picture with a suffix name of svg is processed by changing the straight line into the curve and adjusting the position of a control point of the high-order Bezier curve;
e. and (4) importing a vector font library, and importing the font after font conversion processing into the vector font library by adopting Fontforge software to obtain a personalized font library.
In the step a, deriving the fonts in the vector font library by using fontford software specifically means that all fonts in the vector font library are derived into svg vector pictures by using an API function in the fontford software.
In the step c, the summary character string conversion specifically refers to converting the summary character string into a two-dimensional decimal list.
In the step c, the encoding partition specifically means that different characters ch are partitioned into i = unicode (ch)% n, where n is the number of columns of the list, and the character in the encoding partition i takes the contents in the i-th, i +1, and i +2 indexes in the list as parameters to perform font conversion.
In the step d, the font transformation specifically includes:
q commanding to add information and drawing a second-order Bezier curve;
h, commanding to add information and converting the straight line into a second-order Bezier curve;
the v command adds information, when f is more than 8, the v command converts the straight line into a third-order Bezier curve, and when f is less than 8, the v command converts the straight line into a second-order Bezier curve;
i, commanding to add information and converting a straight line into a second-order Bezier curve;
the q command is a command for drawing a Bezier curve;
the h command is a command for drawing a horizontal straight line;
the v command is a command for drawing a vertical straight line;
the l command is a drawing straight line command;
the f is a number extracted from a fixed location in the list.
In the step e, the font after font conversion processing is introduced into the vector font library by using fontford software, specifically, the font conversion processing is performed by extracting font paths in all font svg format picture path tags by using an API function in the fontford software.
The embodiment is the best implementation mode, when the font is changed, the public key used for font encryption only uses identity information, and can also be added with other information for inputting together, and the same user can also be added with other different information to generate more personalized fonts, so that the expression form of the characters is more vivid and abundant, the emotion and personality behind the characters are transmitted in a visual form, and the experience feeling is enhanced.
The following describes the individual font generation of the present invention in detail by using the bold and square example:
step 1, deriving vector pictures of all fonts in a square and bold font library;
step 2, extracting the information abstract, wherein the information abstract is extracted by using an SM3 cryptographic abstract algorithm, and the processed information format is 'user mailbox + event'; for example, extract information summary for [email protected] office:
SM3 ([email protected] office)
=eddcd1e894c7f181bec43b58dc1831fbeba5e23e8ad1778ee8faf2b0eb2209a3
Step 3, abstract preprocessing
1. And (3) converting the summary character string into a two-dimensional decimal list, such as converting eddcd1e894c7f181bec43b58dc1831fbeba5e23e8ad1778ee8faf b0eb2209a3 into:
2. coding partitions
Dividing different characters ch into i = unicode (ch)% n, wherein n is the number of columns of the list, and the characters in the coding division i take the contents in the i-th, i +1 and i +2 indexes in the list as parameters to perform font conversion;
step 4, adding information into the font
q-Command Add information (q = quadratic Bezier curve)
The command is to draw a second-order Bezier curve, and since the position of an end point cannot be changed, information is added into the information of a control point, and considering that the change amplitude is basically in direct proportion to the length of the curve, the change is as follows:
wherein alpha is a self-defined parameter, alpha can be changed to obtain a desired font, dx is a third parameter of the q command, dy is a fourth parameter of the q command, and i is a coding partition to which the word to be changed belongs;
h command add information (h = horizontalineto)
h commands a position along the x-axis when list [0 ]][(i+2)%32]At > 8, the h command converts the straight line to a third order bezier curve, i.e. (h dx) to:the concrete change is as follows:
when list [0 ]][(i+2)%32]At ≦ 8, the h command converts the line to a second order Bezier curve, i.e. (h dx) to: (c ctrl) x ctrl y dx 0), specifically as follows:
wherein beta is a self-defined parameter which can be changed to obtain a desired font;
v Command Add information (V = vertical lineto)
v-Command is to move a position along the y-axis, when f > 8, v-Command converts the straight line into a third order Bezier curve, (v dy) into:the concrete change is as follows:
when f < 8, the v command converts the line to a second order BesselThe curve, (v dy) translates into: (qctrl) x ctrl y 0 dv), specifically as:
1 Command Add information (l = lineto)
1 Command is to convert a straight line to a second order Bezier curve, i.e. (l dx dy) to q Command
(q ctrl x ctrl y dx dy), specifically as follows:
therefore, the invention can simply, conveniently and quickly generate the personalized font according to the user information.
Claims (6)
1. A method for generating an individual font based on vector line transformation is characterized by comprising the following steps:
a. exporting vector fonts, and exporting the fonts in the vector font library by using fontford software;
b. carrying out summary algorithm processing through SM3 algorithm, extracting information summary from information provided by a user, and changing the information summary into a sequence with fixed length;
c. abstract preprocessing, including abstract character string conversion and coding partition;
d. font transformation, namely, each font is composed of a straight line and a high-order Bezier curve, and a vector picture with a suffix name of svg is processed by changing the straight line into the curve and adjusting the position of a control point of the high-order Bezier curve;
e. and (4) importing a vector font library, and importing the font after font conversion processing into the vector font library by adopting Fontforge software to obtain a personalized font library.
2. The method for generating an individual font based on vector line transformation according to claim 1, wherein: in the step a, deriving the fonts in the vector font library by using fontford software specifically means that all fonts in the vector font library are derived into svg vector pictures by using an API function in the fontford software.
3. The method for generating an individual font based on vector line transformation as claimed in claim 1, wherein: in the step c, the summary character string conversion specifically refers to converting the summary character string into a two-dimensional decimal list.
4. The method for generating an individual font based on vector line transformation as claimed in claim 1, wherein: in the step c, the encoding partition specifically means that different characters ch are partitioned into i = unicode (ch)% n, where n is the number of columns of the list, and the character in the encoding partition i takes the content in the i, i +1, and i +2 indexes in the list as parameters to perform font conversion.
5. The method for generating an individual font based on vector line transformation as claimed in claim 1, wherein: in step d, the font transformation specifically includes:
q, commanding to add information and drawing a second-order Bezier curve;
h, commanding to add information and converting a straight line into a second-order Bezier curve;
the v command adds information, when f is more than 8, the v command converts the straight line into a third-order Bezier curve, and when f is less than 8, the v command converts the straight line into a second-order Bezier curve;
l, commanding to add information and converting a straight line into a second-order Bezier curve;
the q command is a command for drawing a Bezier curve;
the h command is a command for drawing a horizontal straight line;
the v command is a command for drawing a vertical straight line;
the l command is a drawing straight line command;
the f refers to a number extracted from a fixed position in list.
6. The method for generating an individual font based on vector line transformation as claimed in claim 1, wherein: in the step e, the font after font conversion processing is introduced into the vector font library by using fontford software, specifically, the font conversion processing is performed by extracting font paths in all font svg format picture path tags by using an API function in the fontford software.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210287228.8A CN114861595B (en) | 2022-03-22 | 2022-03-22 | Vector line transformation-based individual font generation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210287228.8A CN114861595B (en) | 2022-03-22 | 2022-03-22 | Vector line transformation-based individual font generation method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114861595A CN114861595A (en) | 2022-08-05 |
CN114861595B true CN114861595B (en) | 2023-04-07 |
Family
ID=82627711
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210287228.8A Active CN114861595B (en) | 2022-03-22 | 2022-03-22 | Vector line transformation-based individual font generation method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114861595B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111666739B (en) * | 2020-06-04 | 2023-05-16 | 大连民族大学 | Potrace algorithm-based Chinese vector word stock generation method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101625848A (en) * | 2009-07-28 | 2010-01-13 | 宁波新然电子信息科技发展有限公司 | Realization method of vector font library oriented to embedded platform |
CN110110258A (en) * | 2018-02-01 | 2019-08-09 | 阿里巴巴集团控股有限公司 | A kind of method, apparatus and electronic equipment of text conversion |
CN111666739A (en) * | 2020-06-04 | 2020-09-15 | 大连民族大学 | Chinese vector word stock generation method based on Potrace algorithm |
CN112085816A (en) * | 2020-09-14 | 2020-12-15 | 北京乐学帮网络技术有限公司 | Font curve generation method and device |
CN112784531A (en) * | 2019-11-05 | 2021-05-11 | 北京大学 | Chinese font and word stock generation method based on deep learning and part splicing |
-
2022
- 2022-03-22 CN CN202210287228.8A patent/CN114861595B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101625848A (en) * | 2009-07-28 | 2010-01-13 | 宁波新然电子信息科技发展有限公司 | Realization method of vector font library oriented to embedded platform |
CN110110258A (en) * | 2018-02-01 | 2019-08-09 | 阿里巴巴集团控股有限公司 | A kind of method, apparatus and electronic equipment of text conversion |
CN112784531A (en) * | 2019-11-05 | 2021-05-11 | 北京大学 | Chinese font and word stock generation method based on deep learning and part splicing |
CN111666739A (en) * | 2020-06-04 | 2020-09-15 | 大连民族大学 | Chinese vector word stock generation method based on Potrace algorithm |
CN112085816A (en) * | 2020-09-14 | 2020-12-15 | 北京乐学帮网络技术有限公司 | Font curve generation method and device |
Non-Patent Citations (2)
Title |
---|
胡雪峰 等.基于贝塞尔曲线位图矢量化方法的研究.《西昌学院学报 自然科学版》.2015,第29卷(第2期),第72-75页. * |
郭名芳.基于按需索取的中文Web Fonts应用研究.《中国优秀硕士学问论文全文数据库 信息科技辑》.2013,(第11期),第I139-259页. * |
Also Published As
Publication number | Publication date |
---|---|
CN114861595A (en) | 2022-08-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11899927B2 (en) | Simulated handwriting image generator | |
Jiang et al. | Scfont: Structure-guided chinese font generation via deep stacked networks | |
CN108090400B (en) | Image text recognition method and device | |
CN110414519A (en) | A kind of recognition methods of picture character and its identification device | |
US20130181995A1 (en) | Handwritten character font library | |
JPS6165290A (en) | Generator for vector character font | |
CN103186511A (en) | Method and equipment for word formation of Chinese characters, and method for constructing font object library | |
KR20150082097A (en) | A cloud-based font service system | |
US9159147B2 (en) | Method and apparatus for personalized handwriting avatar | |
CN112036137A (en) | Deep learning-based multi-style calligraphy digital ink simulation method and system | |
CN114861595B (en) | Vector line transformation-based individual font generation method | |
CN103632387A (en) | Method and system for generation of brush writing copybook | |
CN112784531A (en) | Chinese font and word stock generation method based on deep learning and part splicing | |
JP2019028094A (en) | Character generation device, program and character output device | |
CN111507064A (en) | Word stock design method based on computer | |
TW201426512A (en) | Personal handwritten character production system and operation procedure | |
CN117454864A (en) | Display method based on template and data fusion | |
Zhang et al. | Visual knowledge guided intelligent generation of Chinese seal carving | |
KR100856775B1 (en) | System for providing user specific handwriting style based on handwriting data | |
CN112200158B (en) | Training data generation method and system | |
Gao et al. | Automatic generation of chinese vector fonts via deep layout inferring | |
CN112132916B (en) | Seal cutting work customized design generating device for generating countermeasure network | |
CN112395834A (en) | Brain graph generation method, device and equipment based on picture input and storage medium | |
CN116975344B (en) | Chinese character library generation method and device based on Stable diffration | |
Cao | Hierarchical‐based calligraphy style transfer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |