Summary of the invention
The present invention is directed to solve at least one of the technical problems existing in the prior art or related technologies.
For this purpose, first aspect of the present invention is a kind of method for proposing literal size adjustment of character library.
The second aspect of the invention is the system for proposing a kind of literal size adjustment of character library.
The third aspect of the invention is to propose a kind of computer equipment.
The fourth aspect of the invention is to propose a kind of computer readable storage medium.
In view of this, according to an aspect of the present invention, it proposes a kind of methods of the literal size adjustment of character library, comprising:
First time adjustment is carried out to Chinese character to be processed according to pre-set zoom principle, so that the most small character in the word frame gap of Chinese character to be processed
Frame gap is equal to the first preset value;According to default point of Minimum Area shared by the Chinese character to be processed in the first default stepping and second
Minimum Area shared by Chinese character to be processed in shelves determines the adjustment multiple of second of adjustment, and according to adjustment multiple to be processed
Chinese character carries out second and adjusts;Statistics carries out the word frame gap of second of Chinese character to be processed adjusted, true according to word frame gap
Frame Chinese character is made, according to pre-set zoom principle to the progress third time adjustment of frame Chinese character out, in the word frame gap to use frame Chinese character
Most small character frame gap be equal to the first preset value.
The method of the literal size adjustment of character library provided by the invention carries out the to Chinese character to be processed according to pre-set zoom principle
Primary adjustment is contracted so that the most small character frame gap in the word frame gap of Chinese character to be processed is equal to the first preset value by first time
The step of putting realizes all processing Chinese characters under the premise of without departing from word frame, literal to reach maximum value;It is being scaled for the first time
Afterwards, personal character library is literal whole or less than normal because there are part Chinese character write it is bigger, first is that word is more complicated, separately
A kind of outer situation is that the individual stroke first stroke of a Chinese character of Chinese character or receipts pen are long, thus will affect the effect of personalized entirety, therefore,
Chinese character to be processed after carrying out first time scaling, in the Chinese character to be processed after being scaled according to first time in the first default stepping
Minimum Area shared by Chinese character to be processed in the shared default stepping of Minimum Area and second determines the tune of second of adjustment
Integral multiple, and second is carried out to Chinese character to be processed according to adjustment multiple and is adjusted, it is adjusted by second, so that Chinese character to be processed
The area that Minimum Area where the Chinese character of the middle overwhelming majority is distributed in word lattice reaches biggish ratio, realizes Chinese character to be processed
Amplification again;After carrying out second adjustment Chinese character, certainly exist a part of Chinese character beyond word frame, then just count into
The word frame gap of second of Chinese character to be processed adjusted of row, determines frame Chinese character according to word frame gap, according to pre-set zoom original
Third time adjustment then is carried out to frame Chinese character out, it is default that the most small character frame gap in word frame gap to use frame Chinese character is equal to first
Value is scaled by third time, and most of Chinese character integrally will do it amplification in character library, so that personal character library is literal to become larger, by
It is reduced a bit in addition to the biggish Chinese character in part, other most of Chinese characters are uniformly to amplify, therefore globality can compare coordination, have
It solves the problems, such as that personal character library is literal less than normal to effect, reduces subsequent artefacts' Setup Cost, shorten opening for personal character library
The period is sent out, the overall beautiful and harmony of personalized character library is improved.
The method of the literal size adjustment of above-mentioned character library according to the present invention, can also have following technical characteristic:
In the above-mentioned technical solutions, it is preferable that first time tune is being carried out to Chinese character to be processed according to preset scaling principle
Before whole, further includes: obtain the font data of Chinese character to be processed in character library;The font data of Chinese character to be processed is located in advance
Reason.
In the technical scheme, it before carrying out first time adjustment to Chinese character to be processed according to preset scaling principle, obtains
The font data of Chinese character to be processed in character library is taken, if selection is to obtain coding and index pair from cmap in .ttf character library
According to relationship, the font data of all Chinese characters is obtained from glyf;If selection be .otf character library, from cmap obtain coding with
Contrast relationship is indexed, the font data of all Chinese characters is obtained from CFF table;The font data of Chinese character to be processed is standardized
Pretreatment, font data is translated, makes it in the standard word lattice of lower-left coordinate (0,0), in order to the place in later period
Reason.Certainly, it is not limited solely to ttf or otf character library, is equally applicable to the font data of other vectors.
In any of the above-described technical solution, it is preferable that carrying out third time tune to frame Chinese character out according to pre-set zoom principle
After whole, further includes: according to the font data of Chinese character to be processed in progress third time Chinese character update character library to be processed adjusted
And other data in character library.
In the technical scheme, according to pre-set zoom principle to frame Chinese character out carry out third time adjustment after, according into
Row third time Chinese character to be processed adjusted updates in character library other data in the font data and character library of Chinese character to be processed, first
It, will be certainly if obtaining font data from .ttf character library first by all Chinese character pattern profiles according to reverse process when standardization
Font data after dynamic scaling is updated in glyf table, if obtaining font data from .otf character library, by auto zoom
After font data update in CFF table, recalculate in glyf CFF table where all font datas
Minimum Area is updated if having difference with bounding boxes in head table, modifies character library modification time in head
Then variable is verified and is recalculated and updated to all in character library.So realize personal character library scaling and
The update of data.
In any of the above-described technical solution, it is preferable that carried out for the first time according to preset scaling principle to Chinese character to be processed
Adjustment, specifically includes: counting the word frame gap of Chinese character to be processed;Judge whether word frame gap is greater than 0;If word frame gap is greater than 0,
It then carries out carrying out first time amplification to Chinese character to be processed according to preset scaling principle;If word frame gap is less than or equal to 0, then carry out
First time diminution is carried out to Chinese character to be processed according to preset scaling principle.
In the technical scheme, the process of first time adjustment is carried out to Chinese character to be processed according to preset scaling principle, it is first
First, count the word frame gap of Chinese character to be processed, then judge whether word frame gap is greater than 0, if word frame gap is greater than 0, illustrate to
The non-superwood frame of the Chinese character of processing, it is literal smaller, then carried out for the first time according to preset scaling principle to Chinese character to be processed
Amplification, realizes all processing Chinese characters under the premise of without departing from word frame, literal to reach maximum value;As word frame gap is less than or equal to
0, illustrate that there are Chinese characters to be processed there is the case where beyond word frame, then carrying out according to preset scaling principle to the Chinese to be processed
Word carries out first time diminution, realizes all processing Chinese characters under the premise of without departing from word frame, literal to reach maximum value.
In any of the above-described technical solution, it is preferable that according to minimum shared by the Chinese character to be processed in the first default stepping
The adjustment multiple of determining second of the adjustment of Minimum Area shared by Chinese character to be processed in region and the second default stepping, and according to
Before multiple is adjusted to second of adjustment of Chinese character to be processed progress, further includes: the area of Minimum Area is more than or equal to word lattice face
The Chinese character to be processed of long-pending 80% is divided into the first default stepping;By the area of Minimum Area the 60% to 80% of word lattice area
Between Chinese character to be processed be divided into the second default stepping.
In the technical scheme, the Minimum Area according to shared by the Chinese character to be processed in the first default stepping and second is preset
Minimum Area shared by Chinese character to be processed in stepping determines the adjustment multiple of second of adjustment, and treats place according to adjustment multiple
It manages second of Chinese character progress before adjusting, firstly, the Chinese character stepping to be processed after first time is scaled: by the area of Minimum Area
80% Chinese character to be processed more than or equal to word lattice area is divided into the first default stepping, and the Chinese character of this grade is literal larger, ideal
All Chinese characters of state are in the shelves;The area of Minimum Area is to be processed between the 60% to 80% of word lattice area
The Chinese character that Chinese character is divided into second default this grade of stepping is literal smaller, and accounts for character library large percentage, it is intended that by the Chinese of this grade
Word is adjusted to the first default stepping Chinese character.By the way that the Chinese character to be processed of first time scaling is divided the first default stepping and second in advance
If stepping, to calculate the multiple of second of adjustment according to the Chinese character in the first default stepping and the second default stepping.
In any of the above-described technical solution, it is preferable that according to minimum shared by the Chinese character to be processed in the first default stepping
The adjustment multiple of determining second of the adjustment of Minimum Area shared by Chinese character to be processed in region and the second default stepping, and according to
It adjusts multiple and second of adjustment is carried out to Chinese character to be processed, specifically include: obtaining the Chinese character institute to be processed in the first default stepping
The Minimum Area accounted for, and the average value of Minimum Area is calculated as the first average value;It obtains to be processed in the second default stepping
Minimum Area shared by Chinese character, and the average value of Minimum Area is calculated as the second average value;First average value and second is flat
Adjustment multiple of the ratio between the mean value as second of adjustment, and the Chinese character to be processed is carried out second according to the adjustment multiple
Adjustment.
In the technical scheme, the process that Chinese character to be processed carries out second of adjustment specifically includes: obtaining first default point
Minimum Area shared by Chinese character to be processed in shelves, and the average value of Minimum Area is calculated as the first average value;Obtain second
Minimum Area shared by Chinese character to be processed in default stepping, and the average value of Minimum Area is calculated as the second average value;It will
The adjustment multiple of the ratio between first average value and the second average value as second of adjustment.Because of the most of Chinese in fine work word
80% or more of Minimum Area distribution word frame passes through the Chinese character to be processed after scaling first time according to this principle where word
Stepping, and zoomed in and out according to the scale value that Minimum Area where two grades of Chinese characters calculates, so that most in character library
The area that Minimum Area where Chinese character is distributed in word lattice reaches 80% or more, realizes the amplification again of Chinese character to be processed,
And because second of amplification is the literal unified amplification of entire character library, globality can compare coordination.
In any of the above-described technical solution, it is preferable that word frame gap be in Chinese character to be processed and word frame surrounding gap most
Small―gap suture.
In the technical scheme, word frame gap is the minimum clearance in Chinese character to be processed and word frame surrounding gap, between word frame
Gap is greater than 0, illustrates that Chinese character does not go out word frame, and word frame gap illustrates the case where Chinese character exceeds word frame, and word frame gap is greater than 0 less than 0
Under, numerical value is bigger, illustrates literal smaller.
According to the second aspect of the invention, a kind of system of literal size adjustment of character library is proposed, comprising: the first adjustment
Unit, for carrying out first time adjustment to Chinese character to be processed according to pre-set zoom principle, so that the word frame gap of Chinese character to be processed
In most small character frame gap be equal to the first preset value;Second adjustment unit, for according to the Chinese to be processed in the first default stepping
Minimum Area shared by Chinese character to be processed in Minimum Area shared by word and the second default stepping determines the tune of second of adjustment
Integral multiple, and second is carried out to Chinese character to be processed according to adjustment multiple and is adjusted;Third adjustment unit carries out second for counting
Frame Chinese character is determined according to word frame gap in the word frame gap of secondary Chinese character to be processed adjusted, according to pre-set zoom principle to out
Frame Chinese character carries out third time adjustment, and the most small character frame gap in word frame gap to use frame Chinese character is equal to the first preset value.
The system of the literal size adjustment of character library provided by the invention, the first adjustment unit treat place according to pre-set zoom principle
It manages Chinese character and carries out first time adjustment, so that the most small character frame gap in the word frame gap of Chinese character to be processed is equal to the first preset value,
The step of being scaled by first time, realizes all processing Chinese characters under the premise of without departing from word frame, literal to reach maximum value;?
For the first time scale after, personal character library it is literal whole or less than normal because there are part Chinese character write it is bigger, first is that word
More complicated, another situation is that the individual stroke first stroke of a Chinese character of Chinese character or receipts pen are long, thus be will affect personalized whole
Effect, therefore, after carrying out first time scaling, second adjustment unit scaled according to first time after Chinese character to be processed in the
Minimum shared by Chinese character to be processed in Minimum Area shared by Chinese character to be processed in one default stepping and the second default stepping
Region determines the adjustment multiple of second of adjustment, and carries out second to Chinese character to be processed according to adjustment multiple and adjust, and passes through
Second adjusts so that the area that the Minimum Area where Chinese character most in Chinese character to be processed is distributed in word lattice reach compared with
Big ratio realizes the amplification again of Chinese character to be processed;After carrying out second of adjustment Chinese character, a part is certainly existed
Chinese character exceeds word frame, then third adjustment unit carries out the word frame gap of second of Chinese character to be processed adjusted, root with regard to statistics
Frame Chinese character is determined according to word frame gap, third time adjustment is carried out to frame Chinese character out according to pre-set zoom principle, to use frame Chinese character
Word frame gap in most small character frame gap be equal to the first preset value, scaled by third time, most of Chinese character is whole in character library
It will do it amplification, so that personal character library is literal to become larger, due to being reduced a bit in addition to the biggish Chinese character in part, other major parts
Chinese character is uniformly to amplify, therefore globality can compare coordination, efficiently solves the problems, such as that personal character library is literal less than normal, reduces
Subsequent artefacts' Setup Cost shortens the development cycle of personal character library, improves the overall beautiful of personalized character library and association
Tonality.
The system of the literal size adjustment of above-mentioned character library according to the present invention, can also have following technical characteristic:
In the above-mentioned technical solutions, it is preferable that acquiring unit, for obtaining the font data of Chinese character to be processed in character library;
Pretreatment unit is pre-processed for the font data to Chinese character to be processed.
In the technical scheme, it before carrying out first time adjustment to Chinese character to be processed according to preset scaling principle, obtains
Unit is taken to obtain the font data of Chinese character to be processed in character library, if selection is to obtain coding from cmap in .ttf character library
With index contrast relationship, the font data of all Chinese characters is obtained from glyf;If selection is .otf character library, obtained from cmap
Coding and index contrast relationship are taken, the font data of all Chinese characters is obtained from CFF table;Pretreatment unit is to Chinese character to be processed
The pretreatment that font data is standardized, font data is translated, and makes it in the standard word lattice of lower-left coordinate (0,0)
In, in order to the processing in later period.Certainly, it is not limited solely to ttf or otf character library, is equally applicable to the font number of other vectors
According to.
In any of the above-described technical solution, it is preferable that updating unit, for adjusted to be processed according to third time is carried out
Chinese character updates in character library other data in the font data and character library of Chinese character to be processed.
In the technical scheme, it after carrying out third time adjustment to frame Chinese character out according to pre-set zoom principle, updates single
Member is according to its in the font data and character library of Chinese character to be processed in progress third time Chinese character update character library to be processed adjusted
His data, first by all Chinese character pattern profiles according to reverse process when standardization, if obtaining font number from .ttf character library
According to, then the font data after auto zoom is updated in glyf table, it, will if obtaining font data from .otf character library
Font data after auto zoom updates in CFF table, recalculates all fonts in glyf CFF table
Minimum Area where data is updated if having difference with bounding boxes in head table, modifies character library in head
Then modification time variable is verified and is recalculated and updated to all in character library.So realize personal character library
The update of scaling and data.
In any of the above-described technical solution, it is preferable that the first adjustment unit specifically includes: statistic unit, for count to
Handle the word frame gap of Chinese character;Judging unit, for judging whether word frame gap is greater than 0;Amplifying unit, for such as word frame gap
Greater than 0, then carry out carrying out first time amplification to Chinese character to be processed according to preset scaling principle;Reducing unit, for such as word frame
Gap is less than or equal to 0, then carries out carrying out first time diminution to Chinese character to be processed according to preset scaling principle.
In the technical scheme, the first adjustment unit carries out first time tune to Chinese character to be processed according to preset scaling principle
Whole process, firstly, statistic unit counts the word frame gap of Chinese character to be processed, then judging unit judges whether word frame gap is big
It is greater than 0 in 0, such as word frame gap, illustrates the non-superwood frame of Chinese character to be processed, it is literal smaller, then amplifying unit is carried out according to pre-
If scaling principle to Chinese character to be processed carry out first time amplification, realize all processing Chinese characters in the premise without departing from word frame
Under, it is literal to reach maximum value;If word frame gap is less than or equal to 0, illustrate that there are Chinese characters to be processed there is the case where beyond word frame,
So reducing unit carries out carrying out first time diminution to Chinese character to be processed according to preset scaling principle, realizes all processing Chinese
Word is literal to reach maximum value under the premise of without departing from word frame.
In any of the above-described technical solution, it is preferable that the first division unit, for the area of Minimum Area to be more than or equal to
80% Chinese character to be processed of word lattice area is divided into the first default stepping;Second division unit, for by the face of Minimum Area
To be processed Chinese character of the product between the 60% to 80% of word lattice area is divided into the second default stepping.
In the technical scheme, the Minimum Area according to shared by the Chinese character to be processed in the first default stepping and second is preset
Minimum Area shared by Chinese character to be processed in stepping determines the adjustment multiple of second of adjustment, and treats place according to adjustment multiple
It manages second of Chinese character progress before adjusting, firstly, the Chinese character stepping to be processed after first time is scaled: the first division unit will most
80% Chinese character to be processed that the area of zonule is more than or equal to word lattice area is divided into the first default stepping, the Chinese Character of this grade
Face is larger, and all Chinese characters of perfect condition are in the shelves;Second division unit is by the area of Minimum Area in word lattice area
60% to 80% between Chinese character to be processed be divided into second default this grade of stepping Chinese character it is literal smaller, and account for character library ratio
It is larger, it is intended that the Chinese character of this grade is adjusted to the first default stepping Chinese character.Pass through the Chinese character to be processed for scaling first time
The first default stepping and the second default stepping are divided, to calculate according to the Chinese character in the first default stepping and the second default stepping
The multiple of second of adjustment out.
In any of the above-described technical solution, it is preferable that second adjustment unit specifically includes: the first computing unit, for obtaining
Minimum Area shared by the Chinese character to be processed in the first default stepping is taken, and the average value for calculating Minimum Area is average as first
Value;Second computing unit for obtaining Minimum Area shared by the Chinese character to be processed in the second default stepping, and calculates smallest region
The average value in domain is as the second average value;Confirmation unit, for the ratio between the first average value and the second average value to be used as second
The adjustment multiple of adjustment, and second is carried out to the Chinese character to be processed according to the adjustment multiple and is adjusted.
In the technical scheme, the process that second adjustment unit Chinese character to be processed carries out second of adjustment specifically includes: the
One computing unit obtains Minimum Area shared by the Chinese character to be processed in the first default stepping, and calculates the average value of Minimum Area
As the first average value;Second computing unit obtains Minimum Area shared by the Chinese character to be processed in the second default stepping, and counts
The average value of Minimum Area is calculated as the second average value;Confirmation unit regard the ratio between the first average value and the second average value as second
The adjustment multiple of secondary adjustment.Because of 80% or more of Minimum Area distribution word frame where most of Chinese character in fine work word, according to
According to this principle, calculated by the Chinese character stepping to be processed after scaling first time, and according to Minimum Area where two grades of Chinese characters
Scale value out zooms in and out, so that the area that the Minimum Area where Chinese character most in character library is distributed in word lattice reaches
To 80% or more, the amplification again of Chinese character to be processed is realized, and because second of amplification is the literal unification of entire character library
Amplification, therefore globality can compare coordination.
In any of the above-described technical solution, it is preferable that word frame gap be in Chinese character to be processed and word frame surrounding gap most
Small―gap suture.
In the technical scheme, in the technical scheme, word frame gap is in Chinese character to be processed and word frame surrounding gap
Minimum clearance, word frame gap are greater than 0, illustrate that Chinese character does not go out word frame, and word frame gap illustrates Chinese character beyond word frame, between word frame less than 0
In the case that gap is greater than 0, numerical value is bigger, illustrates literal smaller.
According to the third aspect of the present invention, the present invention provides a kind of computer equipment, including memory, processor and
The computer program that can be run on a memory and on a processor is stored, processor realizes following step when executing computer program
It is rapid: first time adjustment to be carried out to Chinese character to be processed according to pre-set zoom principle, so that in the word frame gap of Chinese character to be processed most
Small character frame gap is equal to the first preset value;It is pre- according to Minimum Area shared by the Chinese character to be processed in the first default stepping and second
If Minimum Area shared by the Chinese character to be processed in stepping determines the adjustment multiple of second of adjustment, and treats according to adjustment multiple
It handles Chinese character and carries out second of adjustment;Statistics carries out the word frame gap of second of Chinese character to be processed adjusted, according between word frame
Gap determines frame Chinese character, according to pre-set zoom principle to the progress third time adjustment of frame Chinese character out, between the word frame to use frame Chinese character
Most small character frame gap in gap is equal to the first preset value.
A kind of computer equipment provided by the invention, processor are realized when executing computer program: according to pre-set zoom original
First time adjustment then is carried out to Chinese character to be processed, so that the most small character frame gap in the word frame gap of Chinese character to be processed is equal to first
Preset value realizes all processing Chinese characters under the premise of without departing from word frame the step of scaling by first time, literal to reach most
Big value;First time scale after, personal character library it is literal whole or less than normal because there are the comparisons that part Chinese character is write
Greatly, first is that word is more complicated, another situation is that the individual stroke first stroke of a Chinese character of Chinese character or receipts pen are long, thus be will affect a
The effect of propertyization entirety, therefore, after carrying out first time scaling, first is pre- in the Chinese character to be processed after being scaled according to first time
If Minimum Area shared by the Chinese character to be processed in Minimum Area shared by the Chinese character to be processed in stepping and the second default stepping
To determine the adjustment multiple of second of adjustment, and second of adjustment is carried out to Chinese character to be processed according to adjustment multiple, passes through second
Secondary adjustment, so that the area that the Minimum Area where Chinese character most in Chinese character to be processed is distributed in word lattice reaches biggish
Ratio realizes the amplification again of Chinese character to be processed;After carrying out second of adjustment Chinese character, a part of Chinese character is certainly existed
Beyond word frame, then carrying out the word frame gap of second of Chinese character to be processed adjusted with regard to statistics, determined according to word frame gap
Frame Chinese character, according to pre-set zoom principle to the progress third time adjustment of frame Chinese character out, in the word frame gap to use frame Chinese character most
Small character frame gap is equal to the first preset value, is scaled by third time, and most of Chinese character integrally will do it amplification in character library, thus a
Property character library is literal to become larger, due to reducing a bit in addition to the biggish Chinese character in part, other most of Chinese characters are uniformly to amplify, because
This globality can compare coordination, efficiently solve the problems, such as that personal character library is literal less than normal, reduce subsequent artefacts' Setup Cost,
The development cycle for shortening personal character library improves the overall beautiful and harmony of personalized character library.
According to the fourth aspect of the present invention, it the present invention provides a kind of computer readable storage medium, is stored thereon with
Computer program is performed the steps of according to pre-set zoom principle when computer program is executed by processor to Chinese character to be processed
First time adjustment is carried out, so that the most small character frame gap in the word frame gap of Chinese character to be processed is equal to the first preset value;According to
Minimum shared by Chinese character to be processed in Minimum Area shared by Chinese character to be processed in one default stepping and the second default stepping
Region determines the adjustment multiple of second of adjustment, and carries out second to Chinese character to be processed according to adjustment multiple and adjust;Count into
The word frame gap of second of Chinese character to be processed adjusted of row, determines frame Chinese character according to word frame gap, according to pre-set zoom original
Third time adjustment then is carried out to frame Chinese character out, it is default that the most small character frame gap in word frame gap to use frame Chinese character is equal to first
Value.
A kind of computer readable storage medium provided by the invention is stored thereon with computer program, computer program quilt
Processor is realized when executing: first time adjustment is carried out to Chinese character to be processed according to pre-set zoom principle, so that Chinese character to be processed
The step of most small character frame gap in word frame gap is equal to the first preset value, scales by first time, realize all processing Chinese
Word is literal to reach maximum value under the premise of without departing from word frame;After first time scales, the literal entirety of personal character library is also
It is less than normal, because writing bigger there are part Chinese character, first is that word is more complicated, another situation is that the individual strokes of Chinese character rise
Pen or receipts pen are long, thus will affect the effect of personalized entirety, therefore, after carrying out first time scaling, according to
Minimum Area shared by Chinese character to be processed in Chinese character to be processed after scaling for the first time in first default stepping and second is preset
Minimum Area shared by Chinese character to be processed in stepping is treated to determine the adjustment multiple of second of adjustment according to adjustment multiple
It handles Chinese character and carries out second of adjustment, adjusted by second, so where Chinese character most in Chinese character to be processed most
The area that zonule is distributed in word lattice reaches biggish ratio, realizes the amplification again of Chinese character to be processed;Carrying out second
After secondary adjustment Chinese character, a part of Chinese character is certainly existed beyond word frame, then carrying out with regard to statistics adjusted to be processed for the second time
Frame Chinese character is determined according to word frame gap in the word frame gap of Chinese character, carries out third time to frame Chinese character out according to pre-set zoom principle
Adjustment, the most small character frame gap in word frame gap to use frame Chinese character are equal to the first preset value, are scaled by third time, character library
Middle major part Chinese character integrally will do it amplification, so that personal character library is literal to become larger, due in addition to the biggish Chinese character contracting in part
A little bit smaller, other most of Chinese characters are uniformly to amplify, therefore globality can compare coordination, efficiently solve personal character library word
Face problem less than normal, reduces subsequent artefacts' Setup Cost, shortens the development cycle of personal character library, improves personalized word
The overall beautiful and harmony in library.
Additional aspect and advantage of the invention will become obviously in following description section, or practice through the invention
Recognize.
Specific embodiment
It is with reference to the accompanying drawing and specific real in order to be more clearly understood that aforementioned aspect of the present invention, feature and advantage
Applying mode, the present invention is further described in detail.It should be noted that in the absence of conflict, the implementation of the application
Feature in example and embodiment can be combined with each other.
In the following description, numerous specific details are set forth in order to facilitate a full understanding of the present invention, still, the present invention may be used also
To be implemented using other than the one described here other modes, therefore, protection scope of the present invention is not limited to following public affairs
The limitation for the specific embodiment opened.
The embodiment of first aspect present invention, a kind of method for proposing literal size adjustment of character library, Fig. 1 show the present invention
One embodiment character library literal size adjustment method flow diagram:
Step 102, first time adjustment is carried out to Chinese character to be processed according to pre-set zoom principle, so that the word of Chinese character to be processed
Most small character frame gap in frame gap is equal to the first preset value;
Step 104, in the Minimum Area according to shared by the Chinese character to be processed in the first default stepping and the second default stepping
Chinese character to be processed shared by Minimum Area determine the adjustment multiple of second adjustment, and according to adjustment multiple to Chinese character to be processed
Second is carried out to adjust;
Step 106, statistics carries out the word frame gap of second of Chinese character to be processed adjusted, is determined according to word frame gap
Frame Chinese character, according to pre-set zoom principle to the progress third time adjustment of frame Chinese character out, in the word frame gap to use frame Chinese character most
Small character frame gap is equal to the first preset value.
The method of the literal size adjustment of character library provided by the invention carries out the to Chinese character to be processed according to pre-set zoom principle
Primary adjustment is contracted so that the most small character frame gap in the word frame gap of Chinese character to be processed is equal to the first preset value by first time
The step of putting realizes all processing Chinese characters under the premise of without departing from word frame, literal to reach maximum value;It is being scaled for the first time
Afterwards, personal character library is literal whole or less than normal because there are part Chinese character write it is bigger, first is that word is more complicated, separately
A kind of outer situation is that the individual stroke first stroke of a Chinese character of Chinese character or receipts pen are long, thus will affect the effect of personalized entirety, therefore,
Chinese character to be processed after carrying out first time scaling, in the Chinese character to be processed after being scaled according to first time in the first default stepping
Minimum Area shared by Chinese character to be processed in the shared default stepping of Minimum Area and second determines the tune of second of adjustment
Integral multiple, wherein the schematic diagram of font and word frame as shown in Figure 2, internal rectangle frame is exactly Minimum Area shared by font,
External rectangle frame is exactly the word frame of font in character library, carries out second to Chinese character to be processed according to adjustment multiple and adjusts, passes through
Second adjusts so that the area that the Minimum Area where Chinese character most in Chinese character to be processed is distributed in word lattice reach compared with
Big ratio realizes the amplification again of Chinese character to be processed;After carrying out second of adjustment Chinese character, a part is certainly existed
Chinese character exceeds word frame, then statistics is carried out to the word frame gap of second of Chinese character to be processed adjusted, it is true according to word frame gap
Frame Chinese character is made, according to pre-set zoom principle to the progress third time adjustment of frame Chinese character out, in the word frame gap to use frame Chinese character
Most small character frame gap be equal to the first preset value, pass through third time scale, the literal big ditty of character library as shown in figure 3, figure 4 and figure 5
Whole effect diagram, refined black with system Microsoft under small four font, the contrast effect of regular script.Wherein the first row is existing word
Effect after library zoom technology scaling, the second row is the effect after adjust automatically of the present invention is literal, and the third line is that system Microsoft is refined
Black, fourth line is system regular script.Most of Chinese character integrally will do it amplification in character library of the present invention, thus the literal meeting of personal character library
Become larger, due to reducing a bit in addition to the biggish Chinese character in part, other most of Chinese characters are uniformly to amplify, therefore globality can compare
Coordinate, efficiently solves the problems, such as that personal character library is literal less than normal, reduce subsequent artefacts' Setup Cost, shorten personalized word
The development cycle in library improves the overall beautiful and harmony of personalized character library.
Fig. 6 shows the flow diagram of the method for the literal size adjustment of character library of another embodiment of the invention.Its
In, this method comprises:
Step 602, the font data of Chinese character to be processed in character library is obtained;
Step 604, the font data of Chinese character to be processed is pre-processed;
Step 606, first time adjustment is carried out to Chinese character to be processed according to pre-set zoom principle, so that the word of Chinese character to be processed
Most small character frame gap in frame gap is equal to the first preset value;
Step 608, in the Minimum Area according to shared by the Chinese character to be processed in the first default stepping and the second default stepping
Chinese character to be processed shared by Minimum Area determine the adjustment multiple of second adjustment, and according to adjustment multiple to Chinese character to be processed
Second is carried out to adjust;
Step 610, statistics carries out the word frame gap of second of Chinese character to be processed adjusted, is determined according to word frame gap
Frame Chinese character, according to pre-set zoom principle to the progress third time adjustment of frame Chinese character out, in the word frame gap to use frame Chinese character most
Small character frame gap is equal to the first preset value;
Step 612, according to the font number of Chinese character to be processed in progress third time Chinese character update character library to be processed adjusted
Other data accordingly and in character library.
In one embodiment of the invention, it is preferable that the is being carried out to Chinese character to be processed according to preset scaling principle
Before primary adjustment, further includes: obtain the font data of Chinese character to be processed in character library;The font data of Chinese character to be processed is carried out
Pretreatment.
In this embodiment, it before carrying out first time adjustment to Chinese character to be processed according to preset scaling principle, obtains
The font data of Chinese character to be processed in character library, if selection is to obtain coding from cmap to compare with indexing in .ttf character library
Relationship obtains the font data of all Chinese characters from glyf;If selection is .otf character library, coding and rope are obtained from cmap
Draw contrast relationship, the font data of all Chinese characters is obtained from CFf table;The font data of Chinese character to be processed is standardized
Pretreatment, font data is translated, makes it in the standard word lattice of lower-left coordinate (0,0), in order to the processing in later period.
Certainly, it is not limited solely to ttf or otf character library, is equally applicable to the font data of other vectors.
In one embodiment of the invention, it is preferable that third time is being carried out to frame Chinese character out according to pre-set zoom principle
After adjustment, further includes: according to the font number of Chinese character to be processed in progress third time Chinese character update character library to be processed adjusted
Other data accordingly and in character library.
In this embodiment, after carrying out third time adjustment to frame Chinese character out according to pre-set zoom principle, according to progress
Chinese character to be processed adjusted for the third time updates in character library other data in the font data and character library of Chinese character to be processed, first
It will be automatic if obtaining font data from .ttf character library according to reverse process when standardization by all Chinese character pattern profiles
Font data after scaling is updated in glyf table, if obtaining font data from .otf character library, auto zoom is complete
Font data after finishing updates in CFF table, recalculates in glyf CFF table where all font datas most
Zonule is updated if having difference with bounding boxes in head table, is modified character library modification time in head and is become
Then amount is verified and is recalculated and updated to all in character library.So realize the scaling and number of personal character library
According to update.
Fig. 7 shows the flow diagram of the method for the literal size adjustment of character library of yet another embodiment of the present invention.Its
In, this method comprises:
Step 702, the font data of Chinese character to be processed in character library is obtained;
Step 704, the font data of Chinese character to be processed is pre-processed;
Step 706, the word frame gap of Chinese character to be processed is counted;
Step 708, judge whether word frame gap is greater than 0, if so, 710 are then entered step, if not, entering step 712;
Step 710, it carries out carrying out first time amplification to Chinese character to be processed according to preset scaling principle;
Step 712, it carries out carrying out first time diminution to Chinese character to be processed according to preset scaling principle;
Step 714,80% Chinese character to be processed that the area of Minimum Area is more than or equal to word lattice area is divided into first
Default stepping;
Step 716, to be processed Chinese character of the area of Minimum Area between the 60% to 80% of word lattice area is divided into
Second default stepping;
Step 718, Minimum Area shared by the Chinese character to be processed in the first default stepping is obtained, and calculates Minimum Area
Average value is as the first average value;
Step 720, Minimum Area shared by the Chinese character to be processed in the second default stepping is obtained, and calculates Minimum Area
Average value is as the second average value;
Step 722, the adjustment multiple by the ratio between the first average value and the second average value as second of adjustment, and according to institute
It states adjustment multiple and second of adjustment is carried out to the Chinese character to be processed;
Step 724, statistics carries out the word frame gap of second of Chinese character to be processed adjusted, is determined according to word frame gap
Frame Chinese character, according to pre-set zoom principle to the progress third time adjustment of frame Chinese character out, in the word frame gap to use frame Chinese character most
Small character frame gap is equal to the first preset value;
Step 726, according to the font number of Chinese character to be processed in progress third time Chinese character update character library to be processed adjusted
Other data accordingly and in character library.
In one embodiment of the invention, it is preferable that first is carried out to Chinese character to be processed according to preset scaling principle
Secondary adjustment, specifically includes: counting the word frame gap of Chinese character to be processed;Judge whether word frame gap is greater than 0;As word frame gap is greater than
0, then it carries out carrying out first time amplification to Chinese character to be processed according to preset scaling principle;If word frame gap be less than or equal to 0, then into
Row carries out first time diminution to Chinese character to be processed according to preset scaling principle.
In this embodiment, the process of first time adjustment is carried out to Chinese character to be processed according to preset scaling principle, firstly,
The word frame gap for counting Chinese character to be processed, then judges whether word frame gap is greater than 0, if word frame gap is greater than 0, illustrates to be processed
The non-superwood frame of Chinese character, it is literal smaller, then carry out according to preset scaling principle to Chinese character to be processed progress first time amplification,
All processing Chinese characters are realized under the premise of without departing from word frame, it is literal to reach maximum value;If word frame gap is less than or equal to 0, say
It is bright that there are Chinese characters to be processed there is the case where beyond word frame, then carry out according to preset scaling principle to Chinese character to be processed into
Row reduces for the first time, realizes all processing Chinese characters under the premise of without departing from word frame, literal to reach maximum value.
In one embodiment of the invention, it is preferable that according to shared by the Chinese character to be processed in the first default stepping most
Minimum Area shared by Chinese character to be processed in zonule and the second default stepping determines the adjustment multiple of second of adjustment, and presses
Before carrying out second adjusting to Chinese character to be processed according to adjustment multiple, further includes: the area of Minimum Area is more than or equal to word lattice
The Chinese character to be processed of the 80% of area is divided into the first default stepping;By the area of Minimum Area word lattice area 60% to
Chinese character to be processed between 80% is divided into the second default stepping.
In this embodiment, the Minimum Area according to shared by the Chinese character to be processed in the first default stepping and second default point
Minimum Area shared by Chinese character to be processed in shelves determines the adjustment multiple of second of adjustment, and according to adjustment multiple to be processed
Before Chinese character carries out second adjusting, firstly, the Chinese character stepping to be processed after first time is scaled: the area of Minimum Area is big
It is divided into the first default stepping in 80% Chinese character to be processed for being equal to word lattice area, the Chinese character of this grade is literal larger, ideal shape
All Chinese characters of state are in the shelves;By the to be processed Chinese of the area of Minimum Area between the 60% to 80% of word lattice area
The Chinese character that stroke is divided into second default this grade of stepping is literal smaller, and accounts for character library large percentage, it is intended that by the Chinese character of this grade
It is adjusted to the first default stepping Chinese character.It is preset by the way that the Chinese character to be processed of first time scaling is divided the first default stepping and second
Stepping, to calculate the multiple of second of adjustment according to the Chinese character in the first default stepping and the second default stepping.
In one embodiment of the invention, it is preferable that according to shared by the Chinese character to be processed in the first default stepping most
Minimum Area shared by Chinese character to be processed in zonule and the second default stepping determines the adjustment multiple of second of adjustment, and presses
Second is carried out to Chinese character to be processed according to adjustment multiple to adjust, is specifically included: obtaining the Chinese character to be processed in the first default stepping
Shared Minimum Area, and the average value of Minimum Area is calculated as the first average value;Obtain in the second default stepping wait locate
Minimum Area shared by Chinese character is managed, and calculates the average value of Minimum Area as the second average value;By the first average value and second
Adjustment multiple of the ratio between the average value as second of adjustment, and second is carried out to the Chinese character to be processed according to the adjustment multiple
Secondary adjustment.
In this embodiment, the process that Chinese character to be processed carries out second of adjustment specifically includes: obtaining the first default stepping
In Chinese character to be processed shared by Minimum Area, and calculate the average value of Minimum Area as the first average value;It is pre- to obtain second
If Minimum Area shared by the Chinese character to be processed in stepping, and the average value of Minimum Area is calculated as the second average value;By
The adjustment multiple of the ratio between one average value and the second average value as second of adjustment.Because of most of Chinese character in fine work word
Place Minimum Area is distributed 80% or more of word frame, according to this principle, passes through the Chinese character to be processed point after scaling first time
Shelves, and zoomed in and out according to the scale value that Minimum Area where two grades of Chinese characters calculates, so that the Chinese most in character library
The area that Minimum Area where word is distributed in word lattice reaches 80% or more, realizes the amplification again of Chinese character to be processed, and
Because second of amplification is the literal unified amplification of entire character library, globality can compare coordination.
In one embodiment of the invention, it is preferable that word frame gap is in Chinese character to be processed and word frame surrounding gap
Minimum clearance.
In this embodiment, word frame gap is the minimum clearance in Chinese character to be processed and word frame surrounding gap, word frame gap
Greater than 0, illustrating that Chinese character does not go out word frame, word frame gap illustrates that Chinese character exceeds word frame less than 0, in the case that word frame gap is greater than 0,
Numerical value is bigger, illustrates literal smaller.
The embodiment of second aspect of the present invention, proposes a kind of system 800 of literal size adjustment of character library, and Fig. 8 shows this
The schematic block diagram of the system 800 of the literal size adjustment of the character library of one embodiment of invention:
The first adjustment unit 802, for carrying out first time adjustment to Chinese character to be processed according to pre-set zoom principle, so as to
The most small character frame gap handled in the word frame gap of Chinese character is equal to the first preset value;
Second adjustment unit 804, for the Minimum Area according to shared by the Chinese character to be processed in the first default stepping and
Minimum Area shared by Chinese character to be processed in two default steppings determines the adjustment multiple of second of adjustment, and according to adjustment multiple
Second is carried out to Chinese character to be processed to adjust;
Third adjustment unit 806, for counting the word frame gap for carrying out second of Chinese character to be processed adjusted, according to word
Frame Chinese character is determined in frame gap, third time adjustment is carried out to frame Chinese character out according to pre-set zoom principle, to use the word of frame Chinese character
Most small character frame gap in frame gap is equal to the first preset value.
The system 800 of the literal size adjustment of character library provided by the invention, the first adjustment unit 802 is according to pre-set zoom principle
First time adjustment is carried out to Chinese character to be processed, so that the most small character frame gap in the word frame gap of Chinese character to be processed is equal to first in advance
If value, the step of scaling by first time, all processing Chinese characters are realized under the premise of without departing from word frame, it is literal to reach maximum
Value;First time scale after, personal character library it is literal whole or less than normal because there are part Chinese character write it is bigger,
First is that word is more complicated, another situation is that the individual stroke first stroke of a Chinese character of Chinese character or receipts pen are long, thus will affect individual character
Change whole effect, therefore, after carrying out first time scaling, second adjustment unit 804 according to after scaling for the first time wait locate
Manage the Chinese character to be processed in Minimum Area and the second default stepping shared by the Chinese character to be processed in Chinese character in the first default stepping
Shared Minimum Area determines the adjustment multiple of second of adjustment, wherein the schematic diagram of font and word frame as shown in Figure 2,
Internal rectangle frame is exactly Minimum Area shared by font, and external rectangle frame is exactly the word frame of font in character library, according to adjustment
Multiple carries out second to Chinese character to be processed and adjusts, and is adjusted by second, so that Chinese character most in Chinese character to be processed
The area that the Minimum Area at place is distributed in word lattice reaches biggish ratio, realizes the amplification again of Chinese character to be processed;?
After carrying out second adjustment Chinese character, certainly exist a part of Chinese character beyond word frame, then third adjustment unit 806 just count into
The word frame gap of second of Chinese character to be processed adjusted of row, determines frame Chinese character according to word frame gap, according to pre-set zoom original
Third time adjustment then is carried out to frame Chinese character out, it is default that the most small character frame gap in word frame gap to use frame Chinese character is equal to first
Value is scaled, the literal size adjustment effect schematic diagram of character library as shown in figure 3, figure 4 and figure 5 by third time, under small four font,
It is refined black with system Microsoft, the contrast effect of regular script.Wherein the first row is the effect after existing character library zoom technology scaling, second
Row is the effect after adjust automatically of the present invention is literal, and the third line is that system Microsoft is refined black, and fourth line is system regular script.Word of the present invention
Most of Chinese character integrally will do it amplification in library, so that personal character library is literal to become larger, due in addition to the biggish Chinese character in part
It reduces a bit, other most of Chinese characters are uniformly to amplify, therefore globality can compare coordination, efficiently solve personal character library
Literal problem less than normal, reduces subsequent artefacts' Setup Cost, shortens the development cycle of personal character library, improves personalization
The overall beautiful and harmony of character library.
Fig. 9 shows the schematic block diagram of the system 900 of the literal size adjustment of character library of another embodiment of the invention.Its
In, the system 900 of the literal size adjustment of character library includes:
The first adjustment unit 902, for carrying out first time adjustment to Chinese character to be processed according to pre-set zoom principle, so as to
The most small character frame gap handled in the word frame gap of Chinese character is equal to the first preset value;
Second adjustment unit 904, for the Minimum Area according to shared by the Chinese character to be processed in the first default stepping and
Minimum Area shared by Chinese character to be processed in two default steppings determines the adjustment multiple of second of adjustment, and according to adjustment multiple
Second is carried out to Chinese character to be processed to adjust;
Third adjustment unit 906, for counting the word frame gap for carrying out second of Chinese character to be processed adjusted, according to word
Frame Chinese character is determined in frame gap, third time adjustment is carried out to frame Chinese character out according to pre-set zoom principle, to use the word of frame Chinese character
Most small character frame gap in frame gap is equal to the first preset value;
Acquiring unit 908, for obtaining the font data of Chinese character to be processed in character library;
Pretreatment unit 910 is pre-processed for the font data to Chinese character to be processed;
Updating unit 912, for updating Chinese character to be processed in character library according to progress third time Chinese character to be processed adjusted
Font data and character library in other data;
First division unit 914, for the area of Minimum Area to be more than or equal to 80% Chinese to be processed of word lattice area
Stroke is divided into the first default stepping;
Second division unit 916, for by the area of Minimum Area between the 60% to 80% of word lattice area wait locate
Reason Chinese character is divided into the second default stepping.
Wherein, the first adjustment unit 902 specifically includes:
Statistic unit 9022, for counting the word frame gap of Chinese character to be processed;
Judging unit 9024, for judging whether word frame gap is greater than 0;
Amplifying unit 9026 is greater than 0 for such as word frame gap, then carries out according to preset scaling principle to Chinese character to be processed
Carry out first time amplification;
Reducing unit 9028 is less than or equal to 0 for such as word frame gap, then carries out according to preset scaling principle to be processed
Chinese character carries out first time diminution.
Second adjustment unit 904 specifically includes:
First computing unit 9042, for obtaining Minimum Area shared by the Chinese character to be processed in the first default stepping, and
The average value of Minimum Area is calculated as the first average value;
Second computing unit 9044, for obtaining Minimum Area shared by the Chinese character to be processed in the second default stepping, and
The average value of Minimum Area is calculated as the second average value;
Confirmation unit 9046, for the adjustment times by the ratio between the first average value and the second average value as second of adjustment
Number, and second is carried out to the Chinese character to be processed according to the adjustment multiple and is adjusted.
In one embodiment of the invention, it is preferable that acquiring unit 908, for obtaining Chinese character to be processed in character library
Font data;Pretreatment unit 910 is pre-processed for the font data to Chinese character to be processed.
In this embodiment, it before carrying out first time adjustment to Chinese character to be processed according to preset scaling principle, obtains
Unit 908 obtains the font data of Chinese character to be processed in character library, if selection is to obtain coding from cmap in .ttf character library
With index contrast relationship, the font data of all Chinese characters is obtained from glyf;If selection is .otf character library, obtained from cmap
Coding and index contrast relationship are taken, the font data of all Chinese characters is obtained from CFF table;Pretreatment unit 910 is to the Chinese to be processed
The pretreatment that the font data of word is standardized, font data is translated, and makes it in the standard of lower-left coordinate (0,0)
In word lattice, in order to the processing in later period.Certainly, it is not limited solely to ttf or otf character library, is equally applicable to the word of other vectors
Graphic data.
In one embodiment of the invention, it is preferable that updating unit 912, for adjusted according to third time is carried out
Chinese character to be processed updates in character library other data in the font data and character library of Chinese character to be processed.
In this embodiment, after carrying out third time adjustment to frame Chinese character out according to pre-set zoom principle, updating unit
912 according to its in the font data and character library of Chinese character to be processed in progress third time Chinese character update character library to be processed adjusted
His data, first by all Chinese character pattern profiles according to reverse process when standardization, if obtaining font number from .ttf character library
According to, then the font data after auto zoom is updated in glyf table, it, will if obtaining font data from .otf character library
Font data after auto zoom updates in CFF table, recalculates all fonts in glyf CFF table
Minimum Area where data is updated if having difference with bounding boxes in head table, modifies character library in head
Then modification time variable is verified and is recalculated and updated to all in character library.So realize personal character library
The update of scaling and data.
In one embodiment of the invention, it is preferable that the first adjustment unit 902 specifically includes: statistic unit 9022 is used
In the word frame gap for counting Chinese character to be processed;Judging unit 9024, for judging whether word frame gap is greater than 0;Amplifying unit
9026, it is greater than 0 for such as word frame gap, then carries out carrying out first time amplification to Chinese character to be processed according to preset scaling principle;
Reducing unit 9028 is less than or equal to 0 for such as word frame gap, then carries out carrying out Chinese character to be processed according to preset scaling principle
It reduces for the first time.
In this embodiment, the first adjustment unit 902 carries out for the first time Chinese character to be processed according to preset scaling principle
The process of adjustment, firstly, statistic unit 9022 counts the word frame gap of Chinese character to be processed, then judging unit 9024 judges word frame
Whether gap is greater than 0, if word frame gap is greater than 0, illustrates the non-superwood frame of Chinese character to be processed, literal smaller, then amplifying unit
9026 carry out carrying out first time amplification to Chinese character to be processed according to preset scaling principle, realize all processing Chinese characters and are not surpassing
It is literal to reach maximum value out under the premise of word frame;If word frame gap is less than or equal to 0, illustrate to exist there are Chinese character to be processed super
Out the case where word frame, then reducing unit 9028 carries out carrying out first time contracting to Chinese character to be processed according to preset scaling principle
It is small, all processing Chinese characters are realized under the premise of without departing from word frame, it is literal to reach maximum value.
In one embodiment of the invention, it is preferable that the first division unit 914, for the area of Minimum Area is big
The first default stepping is divided into 80% Chinese character to be processed for being equal to word lattice area;Second division unit 916, being used for will be minimum
To be processed Chinese character of the area in region between the 60% to 80% of word lattice area is divided into the second default stepping.
In this embodiment, the Minimum Area according to shared by the Chinese character to be processed in the first default stepping and second default point
Minimum Area shared by Chinese character to be processed in shelves determines the adjustment multiple of second of adjustment, and according to adjustment multiple to be processed
Before Chinese character carries out second adjusting, firstly, the Chinese character stepping to be processed after first time is scaled: the first division unit 914 will
80% Chinese character to be processed that the area of Minimum Area is more than or equal to word lattice area is divided into the first default stepping, the Chinese character of this grade
Literal larger, all Chinese characters of perfect condition are in the shelves;Second division unit 916 is by the area of Minimum Area in word lattice
The Chinese character that Chinese character to be processed between the 60% to 80% of area is divided into second default this grade of stepping is literal smaller, and accounts for character library
Large percentage, it is intended that the Chinese character of this grade is adjusted to the first default stepping Chinese character.It is to be processed by scaling first time
Chinese character divides the first default stepping and the second default stepping, so as to according to the Chinese character in the first default stepping and the second default stepping
Calculate the multiple of second of adjustment.
In one embodiment of the invention, it is preferable that second adjustment unit 904 specifically includes: the first computing unit
9042, for obtaining Minimum Area shared by the Chinese character to be processed in the first default stepping, and calculate the average value of Minimum Area
As the first average value;Second computing unit 9044, for obtaining minimum shared by the Chinese character to be processed in the second default stepping
Region, and the average value of Minimum Area is calculated as the second average value;Confirmation unit 9046 is used for the first average value and second
Adjustment multiple of the ratio between the average value as second of adjustment, and second is carried out to the Chinese character to be processed according to the adjustment multiple
Secondary adjustment.
In this embodiment, the process that the Chinese character to be processed of second adjustment unit 904 carries out second of adjustment specifically includes: the
One computing unit 9042 obtains Minimum Area shared by the Chinese character to be processed in the first default stepping, and calculates the flat of Minimum Area
Mean value is as the first average value;Second computing unit 9044 obtains smallest region shared by the Chinese character to be processed in the second default stepping
Domain, and the average value of Minimum Area is calculated as the second average value;Confirmation unit 9046 is by the first average value and the second average value
The ratio between adjustment multiple as second adjustment.Because Minimum Area is distributed word frame where most of Chinese character in fine work word
80% or more, according to this principle, by the Chinese character stepping to be processed after scaling first time, and according to where two grades of Chinese characters
The scale value that Minimum Area calculates zooms in and out, so that the Minimum Area where Chinese character most in character library is distributed in
The area of word lattice reaches 80% or more, realizes the amplification again of Chinese character to be processed, and because second of amplification is entire word
The literal unified amplification in library, therefore globality can compare coordination.
In one embodiment of the invention, it is preferable that word frame gap is in Chinese character to be processed and word frame surrounding gap
Minimum clearance.
In this embodiment, in this embodiment, word frame gap is the minimum in Chinese character to be processed and word frame surrounding gap
Gap, word frame gap are greater than 0, illustrate that Chinese character does not go out word frame, and word frame gap illustrates Chinese character beyond word frame, word frame gap is big less than 0
In the case where 0, numerical value is bigger, illustrates literal smaller.
The embodiment of third aspect present invention, proposes a kind of computer equipment, and Figure 10 shows an implementation of the invention
The schematic block diagram of the computer equipment 1000 of example.Wherein, which includes:
Memory 1002, processor 1004 and it is stored in the calculating that can be run on memory 1002 and on processor 1004
Machine program, processor 1004 execute computer program when perform the steps of according to pre-set zoom principle to Chinese character to be processed into
Row adjusts for the first time, so that the most small character frame gap in the word frame gap of Chinese character to be processed is equal to the first preset value;According to first
Smallest region shared by Chinese character to be processed in Minimum Area and the second default stepping shared by Chinese character to be processed in default stepping
Domain determines the adjustment multiple of second of adjustment, and carries out second to Chinese character to be processed according to adjustment multiple and adjust;Statistics carries out
The word frame gap of second of Chinese character to be processed adjusted, determines frame Chinese character according to word frame gap, according to pre-set zoom principle
Third time adjustment is carried out to frame Chinese character out, it is default that the most small character frame gap in word frame gap to use frame Chinese character is equal to first
Value.
A kind of computer equipment 1000 provided by the invention, processor 1004 are realized when executing computer program: according to pre-
First time adjustment is carried out to Chinese character to be processed if scaling principle, so that the most small character frame gap in the word frame gap of Chinese character to be processed
Equal to the first preset value all processing Chinese characters are realized under the premise of without departing from word frame, word the step of scaling by first time
Face reaches maximum value;First time scale after, personal character library it is literal whole or less than normal because there are part Chinese characters to write
It is bigger, first is that word is more complicated, another situation is the individual stroke first stroke of a Chinese character of Chinese character or to receive pen long, thus can
Personalized whole effect is influenced, therefore, after carrying out first time scaling, in the Chinese character to be processed after scaling according to first time
Shared by Chinese character to be processed in Minimum Area shared by Chinese character to be processed in first default stepping and the second default stepping most
Zonule determines the adjustment multiple of second of adjustment, and carries out second to Chinese character to be processed according to adjustment multiple and adjust, and leads to
It crosses second to adjust, so that the area that the Minimum Area where Chinese character most in Chinese character to be processed is distributed in word lattice reaches
Biggish ratio realizes the amplification again of Chinese character to be processed;After carrying out second of adjustment Chinese character, one is certainly existed
Chinese character is divided to exceed word frame, then the word frame gap of second of Chinese character to be processed adjusted is carried out with regard to statistics, according to word frame gap
It determines frame Chinese character, third time adjustment is carried out to frame Chinese character out according to pre-set zoom principle, to use the word frame gap of frame Chinese character
In most small character frame gap be equal to the first preset value, scaled by third time, most of Chinese character integrally will do it amplification in character library,
It can become larger to which personal character library is literal, due to reducing a bit in addition to the biggish Chinese character in part, other most of Chinese characters are unified
Amplification, therefore globality can compare coordination, efficiently solve the problems, such as that personal character library is literal less than normal, reduce subsequent artefacts' tune
It is made into this, shortens the development cycle of personal character library, improves the overall beautiful and harmony of personalized character library.
The embodiment of fourth aspect present invention provides a kind of computer readable storage medium, is stored thereon with computer
Program performs the steps of when computer program is executed by processor and carries out the to Chinese character to be processed according to pre-set zoom principle
Primary adjustment, so that the most small character frame gap in the word frame gap of Chinese character to be processed is equal to the first preset value;It is default according to first
Minimum Area shared by Chinese character to be processed in Minimum Area shared by Chinese character to be processed in stepping and the second default stepping is true
The adjustment multiple of fixed second of adjustment, and second is carried out to Chinese character to be processed according to adjustment multiple and is adjusted;Statistics carries out second
Frame Chinese character is determined according to word frame gap in the word frame gap of secondary Chinese character to be processed adjusted, according to pre-set zoom principle to out
Frame Chinese character carries out third time adjustment, and the most small character frame gap in word frame gap to use frame Chinese character is equal to the first preset value.
A kind of computer readable storage medium provided by the invention is stored thereon with computer program, computer program quilt
Processor is realized when executing: first time adjustment is carried out to Chinese character to be processed according to pre-set zoom principle, so that Chinese character to be processed
The step of most small character frame gap in word frame gap is equal to the first preset value, scales by first time, realize all processing Chinese
Word is literal to reach maximum value under the premise of without departing from word frame;After first time scales, the literal entirety of personal character library is also
It is less than normal, because writing bigger there are part Chinese character, first is that word is more complicated, another situation is that the individual strokes of Chinese character rise
Pen or receipts pen are long, thus will affect the effect of personalized entirety, therefore, after carrying out first time scaling, according to
Minimum Area shared by Chinese character to be processed in Chinese character to be processed after scaling for the first time in first default stepping and second is preset
Minimum Area shared by Chinese character to be processed in stepping is treated to determine the adjustment multiple of second of adjustment according to adjustment multiple
It handles Chinese character and carries out second of adjustment, adjusted by second, so where Chinese character most in Chinese character to be processed most
The area that zonule is distributed in word lattice reaches biggish ratio, realizes the amplification again of Chinese character to be processed;Carrying out second
After secondary adjustment Chinese character, a part of Chinese character is certainly existed beyond word frame, then carrying out with regard to statistics adjusted to be processed for the second time
Frame Chinese character is determined according to word frame gap in the word frame gap of Chinese character, carries out third time to frame Chinese character out according to pre-set zoom principle
Adjustment, the most small character frame gap in word frame gap to use frame Chinese character are equal to the first preset value, are scaled by third time, character library
Middle major part Chinese character integrally will do it amplification, so that personal character library is literal to become larger, due in addition to the biggish Chinese character contracting in part
A little bit smaller, other most of Chinese characters are uniformly to amplify, therefore globality can compare coordination, efficiently solve personal character library word
Face problem less than normal, reduces subsequent artefacts' Setup Cost, shortens the development cycle of personal character library, improves personalized word
The overall beautiful and harmony in library.
In the description of this specification, the description of term " one embodiment ", " some embodiments ", " specific embodiment " etc.
Mean that particular features, structures, materials, or characteristics described in conjunction with this embodiment or example are contained at least one reality of the invention
It applies in example or example.In the present specification, schematic expression of the above terms are not necessarily referring to identical embodiment or reality
Example.Moreover, description particular features, structures, materials, or characteristics can in any one or more of the embodiments or examples with
Suitable mode combines.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.