CN114861595A - Vector line transformation-based individual font generation method - Google Patents

Vector line transformation-based individual font generation method Download PDF

Info

Publication number
CN114861595A
CN114861595A CN202210287228.8A CN202210287228A CN114861595A CN 114861595 A CN114861595 A CN 114861595A CN 202210287228 A CN202210287228 A CN 202210287228A CN 114861595 A CN114861595 A CN 114861595A
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.)
Granted
Application number
CN202210287228.8A
Other languages
Chinese (zh)
Other versions
CN114861595B (en
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.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
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 University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN202210287228.8A priority Critical patent/CN114861595B/en
Publication of CN114861595A publication Critical patent/CN114861595A/en
Application granted granted Critical
Publication of CN114861595B publication Critical patent/CN114861595B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/109Font handling; Temporal or kinetic typography
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/34Browsing; Visualisation therefor
    • G06F16/345Summarisation for human users
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/56Information retrieval; Database structures therefor; File system structures therefor of still image data having vectorial format
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy 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. 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 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

Vector line transformation-based individual font generation method
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 word library manufacturing method, Wanglon provides a personalized art font library generating method in a personalized art font library generating method, 180 Chinese characters handwritten by a user are scanned and stored in a gray level image, after binarization, thinning, smoothing and normalization, the font image is processed and 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 Dong and Liao are put forward a high-quality Chinese character library automatic generation system based on component splicing in a high-quality Chinese character library automatic generation system based on component splicing, and a user needs to write 775 Chinese characters and divide the written Chinese characters into a plurality of parts according to 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 spring proposes that in the construction and optimization of an individualized character library based on strokes and structural information of Chinese characters, various features of a track point set of handwritten Chinese characters are extracted, structural features of an input Chinese character set of a user are divided and extracted, and verification analysis of writing style classification of multi-feature data is performed 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 random operations of scaling, stretching and rotating, 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 number CN112784531A and publication date 2021, 05 and 11 disclose a Chinese character pattern generation method based on deep learning and component splicing, which carries out structural splitting on Chinese character patterns in a target word stock 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 the existing font library 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 a vector font;
G. constructing a frame structure prediction model, and predicting the frame structure of the font corresponding to the 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 characters in the encoding partition i take 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 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 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, and font types in a vector font library are exported by Fontform 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 importing a 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 invention has simple and quick font generation, and the user can complete the generation, installation and writing of the document by using the font in the webpage or the word plug-in.
3. The font generation can support the fact, the identity certification is processed in the face of different application scenes, the user can input different events and related descriptions to obtain personalized fonts, and 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 are 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. According to the invention, when the font is changed, the public key used for font encryption can be input together with other information besides identity information, and the same user can also add other different information to generate more personalized fonts, so that the expression form of the characters is more vivid and abundant, and the emotion and personality behind the characters are transmitted in a visual form, thereby 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 the "Rong" word in an example.
Detailed Description
Example 1
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.
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 scenarios, and because of 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 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.
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 characters in the encoding partition i take the contents in the i-th, 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 user, and changing the information summary into 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 characters in the encoding partition i take 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 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 basic anti-repudiation capability, which enhances 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 characters in the encoding partition i take 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 refers to a number extracted from a fixed position in 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, namely extracting the information abstract by using an SM3 national secret abstract algorithm, wherein the processed information format is 'user mailbox + event'; com office abstract information as 3312280576@ qq:
SM3(3312280576@ qq. com office)
=eddcd1e894c7f181bec43b58dc1831fbeba5e23e8ad1778ee8faf2b0eb2209a3
Step 3, abstract preprocessing
1. And (3) converting the summary character string into a two-dimensional decimal list, such as converting eddcd1e894c7f181bec43b58dc1831fbeba5e23e8ad1778ee8faf2b 8 eb2209a3 into:
Figure BDA0003558768660000091
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 carry out 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 because 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 proportional to the length of the curve, the specific change is as follows:
Figure BDA0003558768660000092
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 addition 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:
Figure BDA0003558768660000101
the concrete changes are as follows:
Figure BDA0003558768660000102
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), the specific variations are:
Figure BDA0003558768660000103
wherein beta is a self-defined parameter which can be changed to obtain a desired font;
v command add information (V vertical lineto)
The v-command is to move a position along the y-axis, and when f > 8, the v-command converts the straight line into a third order bezier curve, (v dy) into:
Figure BDA0003558768660000104
the concrete change is as follows:
Figure BDA0003558768660000105
when f < 8, the v command converts the straight line to a second order Bezier curve, (v dy) to: (qctrl) x ctrl y 0dv), specifically as:
Figure BDA0003558768660000106
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:
Figure BDA0003558768660000111
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 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.
2. The method for generating an individual font based on vector line transformation as claimed in claim 1, wherein: 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.
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 characters in the encoding partition i take the contents in the i-th, 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 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 from a fixed location in the list.
6. The method for generating an individual font based on vector line transformation according to 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.
CN202210287228.8A 2022-03-22 2022-03-22 Vector line transformation-based individual font generation method Active CN114861595B (en)

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 true CN114861595A (en) 2022-08-05
CN114861595B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111666739A (en) * 2020-06-04 2020-09-15 大连民族大学 Chinese vector word stock generation method based on Potrace algorithm

Citations (5)

* Cited by examiner, † Cited by third party
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
胡雪峰 等: "基于贝塞尔曲线位图矢量化方法的研究" *
郭名芳: "基于按需索取的中文Web Fonts应用研究" *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111666739A (en) * 2020-06-04 2020-09-15 大连民族大学 Chinese vector word stock generation method based on Potrace algorithm
CN111666739B (en) * 2020-06-04 2023-05-16 大连民族大学 Potrace algorithm-based Chinese vector word stock generation method

Also Published As

Publication number Publication date
CN114861595B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN109190722B (en) Font style migration transformation method based on Manchu character picture
US11899927B2 (en) Simulated handwriting image generator
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
CN103186511A (en) Method and equipment for word formation of Chinese characters, and method for constructing font object library
US9159147B2 (en) Method and apparatus for personalized handwriting avatar
KR20150082097A (en) A cloud-based font service system
CN112036137A (en) Deep learning-based multi-style calligraphy digital ink simulation method and system
CN110097615B (en) Stylized and de-stylized artistic word editing method and system
JP2019028094A (en) Character generation device, program and character output device
CN112784531A (en) Chinese font and word stock generation method based on deep learning and part splicing
CN114861595B (en) Vector line transformation-based individual font generation method
CN110211032B (en) Chinese character generating method and device and readable storage medium
Yang Application and development of digital enhancement of traditional sculpture art
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
CN112541954B (en) Method for intelligently producing poster according to graphic features
Lakhanpal et al. Refining Text-to-Image Generation: Towards Accurate Training-Free Glyph-Enhanced Image Generation
CN110163975B (en) Method, device and equipment for drawing space straight line and storage medium
CN112395834A (en) Brain graph generation method, device and equipment based on picture input and storage medium

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