CN104834389A - Chinese character Webfont generation method - Google Patents

Chinese character Webfont generation method Download PDF

Info

Publication number
CN104834389A
CN104834389A CN201510242151.2A CN201510242151A CN104834389A CN 104834389 A CN104834389 A CN 104834389A CN 201510242151 A CN201510242151 A CN 201510242151A CN 104834389 A CN104834389 A CN 104834389A
Authority
CN
China
Prior art keywords
chinese character
webfont
stroke
generation method
font
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
CN201510242151.2A
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.)
Anyang Normal University
Original Assignee
Anyang Normal University
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 Anyang Normal University filed Critical Anyang Normal University
Priority to CN201510242151.2A priority Critical patent/CN104834389A/en
Publication of CN104834389A publication Critical patent/CN104834389A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

The invention discloses a Chinese character Webfont generation method. The Chinese character Webfont generation method comprises the steps of submitting a character request character string S, obtaining font descriptors d corresponding to each Chinese character in the S by searching a DCDML dynamic description library file to obtain a font description set D; carrying out stroke extraction on the font descriptors d in sequence to obtain a point set P forming strokes; successively connecting the point coordinates of the P to form the strokes; integrally displaying the connecting information of all point strokes in the set P, and generating corresponding Webfont Chinese characters f of the font descriptors d; carrying out local optimization on the f; obtaining a Webfont character string corresponding to the character request character string S, and returning to a user. According to the Chinese character Webfont generation method disclosed by the invention, the font counting process is carried out on a server side, so that the requirement for the server side is relatively low, and the method is extremely suitable for being used on mobile terminals.

Description

A kind of Chinese character Webfont generation method
Technical field
The invention belongs to computer realm, be specifically related to a kind of Chinese character Webfont generation method.
Background technology
Along with the development of internet, cloud computing and mobile calculation technique, people are to the input of Chinese character and shown new demand, as individual demand, polynary aesthetic requirement, cultural connotation demand, machine write demand, security requirement etc.Traditional Chinese character generation technique is difficult to meet these demands, and WebFont technology is the strong approach addressed this problem.
WebFont and network font, refer to not use the machine font and use online font to carry out effect and play up.Its maximum benefit is, the text effects that any user sees is all the same, does not worry that user computer does not install specific font and the inconsistent phenomenon of appearance effect.Google company is comparatively early proposed English WebFont service system, and other more ripe English WebFont supplier has Typekit, Font Squirrel etc. of Monotype Imaging company, Adobe.In Chinese Web Font research, the WebFont Server system of prestige cutting edge of a knife or a sword digital development, comprises magnificent health Chinese-traditional font 30 and overlaps, and often overlaps 14650 words; JustFont is a set of WebFont that Taiwan is released, and provides service webpage using Chinese font.
The WebFont font of the current overwhelming majority is all western languages, and the Chinese culture of extensive knowledge and profound scholarship, be embodied in greatly on Chinese character, but today more and more deep on social life impact in internet, the investigation and application of Chinese character WebFont is but obviously delayed, its main cause has: 1. for certain font, needs to design special character library; 2. Chinese character style is too large, and under existing network bandwidth environment, the display efficiency of Chinese network font is poor; 3. most of outstanding Chinese font copyright fee is higher, does not provide paid service as required.Design Chinese character WebFont based on Chinese character pattern Dynamic profiling language (Dynamic Character Description language, DCDL) and can effectively make up above-mentioned deficiency.DCDL is highly suitable on internet and uses, and it uses Hanzi features to describe storehouse and instead of Hanzi font library.Hanzi features describes library storage at server end, the display of Chinese character is realized by the demand of client or mobile phone users, user is without the need to installing local character library, but adopt distributed font to describe storage mode, the computing function in server end (or high in the clouds), controlling functions and management function can be given full play to.
For the deficiency that Traditional Man is main Chinese character pattern design, Chinese scholars is all carrying out the automatic generation research of Chinese character pattern.Main Achievements comprise the Chinese character pattern generation technique based on calligraphy rule, the font derivation method based on stroke feature, based on morphologic font automatic generation method, automatically generate based on the Chinese character of curved profile, the Chinese character generating method based on Dynamic profiling storehouse, the Chinese character pattern generating algorithm etc. based on IDS.Researcher is outside traditional Chinese character pattern profile description technique, have developed a lot of and Chinese character and automatically generate relevant Chinese character pattern description technique, such as: the stroke segment mesh font that the Mathmatical Expression of Chinese Characters that the HanGlyph that Hong Kong Baptist University proposes, the National University of Defense technology propose, Beijing Language and Culture University and Inner Mongol Normal University propose describes, Univ California-Berkeley's proposition based on stroke and the font descriptive language CDL (CharacterDescription language) of Hanzi component, the Chinese character Auto etc. of Kyoto Univ Japan.But these font description techniques are not furtherd investigate the generative process of Chinese character, be difficult to personal characteristics and the cultural traits of outstanding Chinese character uniqueness, more cannot embody writing and calligraphy characteristic of Chinese character.Chinese-character writing process as important Expressive Features, is proposed a kind of new dynamic fonts descriptive language DCDL by Anyang Teachers College.DCDL is applicable to dynamically generating Chinese character on the internet, for Chinese character WebFont provides technical foundation.Literature research to describe the Chinese character Auto on basis, storehouse at dynamic fonts, by Bezier, Chinese character skeleton is reduced, but it for research contents, and does not consider that dynamic fonts describes the application of storehouse on Webfont with the Bezier of each stroke.
In sum, current Chinese Web Font research is less, and there are some problems: as the character library needing artificial design special; Font is required to download to the machine etc. during use.The Chinese character Auto that research describes storehouse based on font can address these problems effectively.
Summary of the invention
An object of the present invention needs special character library for solving Chinese Web Font, needs the problem downloading to the machine, provide a kind of Chinese character Webfont generation method during use.
The invention provides a kind of Chinese character Webfont generation method, comprise the following steps:
Step1: submission word request character string S=c 0c 1... c n, wherein c i(i ∈ [0, n]) represents a Chinese character;
Step2: by searching DCDML Dynamic profiling library file, obtains each Chinese character c in S icorresponding font descriptor d i(i ∈ [0, n]), obtains font description collections D={d 0, d 1..., d n;
Step3: successively to d i∈ D carries out stroke extraction, namely utilizes boundary's point mark (-64,0) to carry out stroke segmentation, obtains the some set P={p forming stroke 0, p 1..., p n;
Step4: connect p in turn 0, p 1..., p npoint coordinate formed stroke, if stroke is formed by 2, then for straight line connection; If stroke is made up of three and above unique point, then form a broken line;
Step5: there is the link information of a stroke in the institute in overall display set P, generation d ithe corresponding Webfont Chinese character f of ∈ D i;
Step6: to f icarry out local optimum;
Step7: repeat Step3-6;
Step8: obtain with word request character string S=c 0c 1... c ncorresponding Webfont character string S webfont=f 0f 1... f n, by S webfontreturn to user.
Further, described DCDML Dynamic profiling library file is the Chinese character pattern Dynamic profiling storehouse that XML format stores.
Further, the described Chinese character pattern Dynamic profiling storehouse record unique point coordinate figure of Chinese character and the number of point, the corresponding two or more coordinate points information of every unicursal of Chinese character, according to the order of writing strokes collection of Chinese character during coordinate points sampling, putting in order of stroke point embodies the order of strokes observed in calligraphy, with coordinate (-64 between stroke and stroke, 0) interval, the end of an all stroke of Chinese character represents with (-64 ,-64), between Chinese character and Chinese character with symbol ";;, " interval.
Further, antialiasing optimization, B-spline function optimization of profile, Bayside optimization of profile and User Defined optimization are comprised to the method for font optimization.
Further, described antialiasing optimization carries out soften handled to figure or image border exactly, makes its edge seem more level and smooth.
Further, described B-spline function optimization of profile is, when stroke is made up of 3 and above unique point, can be reference mark by these unique points, draw one or more B-spline curves.
Further, described Bayside optimization of profile is, when stroke is made up of 3 and above unique point, is reference mark by these unique points, draws one or more Bezier.
Further, described User Defined is optimized for and the unique point forming Chinese character pattern is set to dynamic editable reference mark, and user is according to the needs of oneself, and mobile reference mark generates different font effects.
Beneficial effect of the present invention is: Chinese character Webfont generation method of the present invention, the font automatic generation method be applicable on network designed for Chinese character specially.User is without the need to designing special character library, and without the need to character library is downloaded to local machine, being calculated by the font of server end namely can at the Chinese character that browser end generates and optimizing user needs.Because font computation process is all carried out at server end, therefore lower to the requirement of client, be highly suitable for mobile terminal and use.
Embodiment
Hereafter will describe the present invention in detail in conjunction with specific embodiments.It should be noted that the combination of technical characteristic or the technical characteristic described in following embodiment should not be considered to isolated, they can mutually be combined thus be reached better technique effect.
Now for " Ah "'s word is described:
Input Chinese character " Ah "'s word, that is: S=c 0=" Ah "
" the coordinate points information that Ah "'s word is corresponding, i.e. D={d is retrieved in DCDML literary composition 0be:
“-64,0,-6,-7,-2,-7,-4,-2,-2,0,-2,3,-4,4,-6,3,-64,0,-6,-7,-6,8,-64,0,-1,-7,8,-7,-64,0,6,-7,6,7,4,7,-64,0,0,-3,0,2,-64,0,0,-3,3,-3,3,3,-64,0,0,2,3,2,-64,-64,,,,,,”
To d 0∈ D carries out stroke extraction, namely with coordinate points "-60,0 " for dividing mark, obtain " each stroke of Ah " is respectively:
(1) the cross break folding part of " Fu " is divided, i.e. p 0: "-6 ,-7 ,-2 ,-7 ,-4 ,-2 ,-2,0 ,-2,3 ,-4,4 ,-6,3 ";
(2) " Shu " part of " Fu ", i.e. p 1: "-6 ,-7 ,-6,8 ";
(3) " one " part, i.e. p 2: "-1 ,-7,8 ,-7 ";
(4) “ 亅 " part, i.e. p 3: " 6 ,-7,6,7,4,7 ";
(5): " Shu " part of " mouth ", i.e. p 4: " 0 ,-3,0,2 ";
(6): the cross break part of " mouth ", i.e. p 5: " 0 ,-3,3 ,-3,3,3 ";
(7): " one " part of " mouth ", i.e. p 6: " 0,2,3,2 ";
(8): last coordinate points is "-64 ,-64 ", all strokes of this word terminate;
(9): ",,, " be gap character between Chinese character and Chinese character;
(10): therefore, " the some stroke set of Ah " is combined into: P={p 0, p 1, p 2, p 3, p 4, p 5, p 6}
Connect p in turn 0, p 1, p 2, p 3, p 4, p 5, p 6the point coordinate of each stroke.If stroke is 2 points, be then linked to be straight line, if stroke is made up of the point of more than 3, then form broken line.It is noted that due to store time numeral less, before proceeding, need to amplify the numeral of each coordinate points, as being amplified to 20 times, then p 1actual coordinate value is: "-120 ,-140 ,-120,160 ";
Overall display P={p 0, p 1, p 2, p 3, p 4, p 5, p 6link information, obtain that " the Chinese character pattern profile of Ah ", namely obtains d 0the Wenbfont font f of ∈ D 0=" Ah ";
To f 0=" Ah " carries out local optimum:
1, antialiasing optimization: carry out soften handled to Chinese character pattern edge, makes its edge seem more level and smooth.Multiple programs method is had to realize, as the setRenderingHint () method provided in Java Graphics2D tool-class.
2, B-spline curves optimization: when stroke is made up of 3 and above unique point, can be reference mark by these unique points, draw one or more B-spline curves.B-spline curves formula: 0≤t≤1 in formula; I=0,1,2 ..., m.
3, Bezier optimization: when stroke is made up of 3 and above unique point, be reference mark by these unique points, draw one or more Bezier.Bezier formula: P i k = P i k = 0 ( l - t ) P i k - 1 + tP i + 1 k - 1 k = 1,2 , . . . , n ; i = 0,1 , . . . , n - k .
4, User Defined optimization, the unique point forming Chinese character pattern is set to dynamic editable reference mark, and user, according to the needs of oneself, moves reference mark by mouse and generates different font effects.Note, in this invention, self-defined optimization is not carried out, as P={p to the font that an overall stroke is straight line 0, p 1, p 2, p 3, p 4, p 5, p 6in p 1, p 2, p 4, p 6all be not set to dynamic editable point.
Due to S=c 0=" Ah " only has a Chinese character, therefore terminates; Otherwise, repeat above 3-6 and walk.
Obtain S=c 0the Webfont character string S that=" Ah " is corresponding webfont=f 0=" Ah ", by S webfontreturn to user.
Chinese character Webfont generation method of the present invention, the font automatic generation method be applicable on network designed for Chinese character specially.User is without the need to designing special character library, and without the need to character library is downloaded to local machine, being calculated by the font of server end namely can at the Chinese character that browser end generates and optimizing user needs.Because font computation process is all carried out at server end, therefore lower to the requirement of client, be highly suitable for mobile terminal and use.
Although give some embodiments of the present invention, it will be understood by those of skill in the art that without departing from the spirit of the invention herein, can change embodiment herein.Above-described embodiment is exemplary, should using embodiment herein as the restriction of interest field of the present invention.

Claims (8)

1. a Chinese character Webfont generation method, is characterized in that, comprise the following steps:
Step 1: submission word request character string S=c 0c 1c n, wherein c i(i ∈ [0, n]) represents a Chinese character;
Step2: by searching DCDML Dynamic profiling library file, obtains each Chinese character c in S icorresponding font descriptor d i(i ∈ [0, n]), obtains font description collections D={d 0, d 1..., d n;
Step3: successively to d i∈ D carries out stroke extraction, namely utilizes boundary's point mark (-64,0) to carry out stroke segmentation, obtains the some set P={p forming stroke 0, p 1..., p n;
Step4: connect p in turn 0, p 1..., p npoint coordinate formed stroke, if stroke is formed by 2, then for straight line connection; If stroke is made up of three and above unique point, then form a broken line;
Step5: there is the link information of a stroke in the institute in overall display set P, generation d ithe corresponding Webfont Chinese character f of ∈ D i;
Step6: to f icarry out local optimum;
Step7: repeat Step3-6;
Step8: obtain with word request character string S=c 0c 1c ncorresponding Webfont character string S webfont=f 0f 1... f n, by S webfontreturn to user.
2. a kind of Chinese character Webfont generation method as claimed in claim 1, is characterized in that, described DCDML Dynamic profiling library file is the Chinese character pattern Dynamic profiling storehouse that XML format stores.
3. a kind of Chinese character Webfont generation method as claimed in claim 2, it is characterized in that, described file Chinese character pattern Dynamic profiling storehouse Chinese character pattern describes the storehouse record unique point coordinate figure of Chinese character and the number of point, the corresponding two or more coordinate points information of every unicursal of Chinese character, according to the order of writing strokes collection of Chinese character during coordinate points sampling, putting in order of stroke point embodies the order of strokes observed in calligraphy, with coordinate (-64 between stroke and stroke, 0) interval, the end of an all stroke of Chinese character is with (-64,-64) represent, between Chinese character and Chinese character, use mark space.
4. a kind of Chinese character Webfont generation method as described in any one of claim 1-3, is characterized in that, comprise antialiasing optimization, B-spline function optimization of profile, Bayside optimization of profile and User Defined optimization to the method for font optimization.
5. a kind of Chinese character Webfont generation method as claimed in claim 4, is characterized in that, described antialiasing optimization carries out soften handled to figure or image border exactly, makes its edge seem more level and smooth.
6. a kind of Chinese character Webfont generation method as claimed in claim 4, is characterized in that, described B-spline function optimization of profile is, when stroke is made up of 3 and above unique point, can be reference mark by these unique points, draw one or more B-spline curves.
7. a kind of Chinese character Webfont generation method as claimed in claim 4, is characterized in that, described Bayside optimization of profile is, when stroke is made up of 3 and above unique point, is reference mark by these unique points, draws one or more Bezier.
8. a kind of Chinese character Webfont generation method as claimed in claim 4, it is characterized in that, described User Defined is optimized for and the unique point forming Chinese character pattern is set to dynamic editable reference mark, and user is according to the needs of oneself, and mobile reference mark generates different font effects.
CN201510242151.2A 2015-05-13 2015-05-13 Chinese character Webfont generation method Pending CN104834389A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510242151.2A CN104834389A (en) 2015-05-13 2015-05-13 Chinese character Webfont generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510242151.2A CN104834389A (en) 2015-05-13 2015-05-13 Chinese character Webfont generation method

Publications (1)

Publication Number Publication Date
CN104834389A true CN104834389A (en) 2015-08-12

Family

ID=53812326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510242151.2A Pending CN104834389A (en) 2015-05-13 2015-05-13 Chinese character Webfont generation method

Country Status (1)

Country Link
CN (1) CN104834389A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108073585A (en) * 2016-11-08 2018-05-25 北京国双科技有限公司 Network font loading method, device and system
CN111488104A (en) * 2020-04-16 2020-08-04 维沃移动通信有限公司 Font editing method and electronic equipment
CN113761231A (en) * 2021-09-07 2021-12-07 浙江传媒学院 Text character feature-based text data attribution description and generation method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256563A (en) * 2006-12-26 2008-09-03 威锋数位开发股份有限公司 System and method for on-line generation of asian documents with multiple font faces
KR20090002926A (en) * 2007-07-05 2009-01-09 허영순 System and method for webfont service on webhosting
CN101881999A (en) * 2010-06-21 2010-11-10 安阳师范学院 Oracle video input system and implementation method
KR20140140257A (en) * 2013-05-29 2014-12-09 (주) 타이포링크 System for transmitting webfont created by client-requested script subset, and method for transmitting webfont using the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256563A (en) * 2006-12-26 2008-09-03 威锋数位开发股份有限公司 System and method for on-line generation of asian documents with multiple font faces
KR20090002926A (en) * 2007-07-05 2009-01-09 허영순 System and method for webfont service on webhosting
CN101881999A (en) * 2010-06-21 2010-11-10 安阳师范学院 Oracle video input system and implementation method
KR20140140257A (en) * 2013-05-29 2014-12-09 (주) 타이포링크 System for transmitting webfont created by client-requested script subset, and method for transmitting webfont using the same

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
吴琴霞等: "基于动态描述库的汉字字形自动生成技术研究", 《科学技术与工程》 *
栗青生等: "甲骨文字形动态描述库及其字形生成技术研究", 《北京大学学报(自然科学版)》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108073585A (en) * 2016-11-08 2018-05-25 北京国双科技有限公司 Network font loading method, device and system
CN111488104A (en) * 2020-04-16 2020-08-04 维沃移动通信有限公司 Font editing method and electronic equipment
CN111488104B (en) * 2020-04-16 2021-10-12 维沃移动通信有限公司 Font editing method and electronic equipment
CN113761231A (en) * 2021-09-07 2021-12-07 浙江传媒学院 Text character feature-based text data attribution description and generation method
CN113761231B (en) * 2021-09-07 2022-07-12 浙江传媒学院 Text character feature-based text data attribution description and generation method

Similar Documents

Publication Publication Date Title
US20210375042A1 (en) Method and apparatus for generating virtual avatar, device and storage medium
US20220351016A1 (en) Presentation module for webinterface production and deployment system
US20160092405A1 (en) Intent Based Authoring
US11288273B2 (en) Machine learning based plug-in for providing access to cloud-based analytics engine
CN104820704A (en) Creating method and browsing method for inline marked comment of web text
JP7289942B2 (en) Font generation model training method, font library creation method, font generation model training device, font library creation device, electronic device, computer-readable storage medium, and computer program
US11816908B2 (en) Method of generating font database, and method of training neural network model
CN104834389A (en) Chinese character Webfont generation method
CN112015468B (en) Interface document processing method and device, electronic equipment and storage medium
KR20220034075A (en) Method and apparatus for training a font generation model, method and apparatus for establishing a font library, and device
CN113657395A (en) Text recognition method, and training method and device of visual feature extraction model
CN113434755A (en) Page generation method and device, electronic equipment and storage medium
CN114706894A (en) Information processing method, apparatus, device, storage medium, and program product
CN115796178A (en) Data processing method, device and equipment
US20230154077A1 (en) Training method for character generation model, character generation method, apparatus and storage medium
CN115082298A (en) Image generation method, image generation device, electronic device, and storage medium
CN110851521B (en) Method, device and storage medium for data visualization
CN116306496B (en) Character generation method, training method and device of character generation model
US20230206522A1 (en) Training method for handwritten text image generation mode, electronic device and storage medium
CN103731393A (en) Method for compressing Web resource data
CN113591464B (en) Variant text detection method, model training method, device and electronic equipment
CN114625460B (en) Image-text mixed arrangement method, device, equipment and storage medium
CN113360712B (en) Video representation generation method and device and electronic equipment
US11798301B1 (en) Compositional pipeline for generating synthetic training data for machine learning models to extract line items from OCR text
WO2024098516A1 (en) Social network key node mining method and device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150812