Summary of the invention
In order to solve the problem, the invention provides a kind of method and system generating font character library, thus complete typesetting in generic text software for editing after, select this font character library, just automatically can substitute alphabetical sequence with square font.
According to a first aspect of the invention, provide a kind of method generating font character library, the method comprises: the square font generating the alphabetical sequence be made up of one or more letter; Create the corresponding relation between alphabetical sequence and square font, to show corresponding square font when input alphabet sequence; The layout table information of configuration OpenType character library; And according to the layout table information after the configuration of square font, corresponding relation and OpenType character library, generate font character library.
Wherein, above-mentioned letter can be English alphabet or Chinese phonetic alphabet etc.
When generating square font, first can generate the alphabetical font of each letter, then according to the alphabetical font of each letter comprised in alphabetical sequence, carrying out the square font of combination producing alphabetical sequence.
When alphabetical sequence only comprise one alphabetical time, can by the square font of an alphabetical alphabetical font as alphabetical sequence.
After generation square font, initial character library can be generated according to generated square font, using the basis as generation font character library.
When generating initial character library, the profile of matching square font can be carried out according to square font, thus generate initial character library.
The layout table information be configured refers to that the single replacement of replacing in sublist is replaced with fit, and single replacement makes identical letter replace with identical alphabetical font, and fit replacement makes alphabetical sequence replace with the square font corresponding with it.Capitalization and lowercase are considered as described identical letter.
According to a second aspect of the invention, provide a kind of system generating font character library, comprising: square font generating apparatus, generate the square font of the alphabetical sequence be made up of one or more letter; Corresponding relation creation apparatus, creates the corresponding relation between alphabetical sequence and square font, to show corresponding square font when input alphabet sequence; Inking device, the layout table information of configuration OpenType character library; And font character library generating apparatus, according to the layout table information after the configuration of square font, corresponding relation and OpenType character library, generate font character library.
Wherein, this letter is English alphabet or Chinese phonetic alphabet.
First square font generating apparatus can generate the alphabetical font of each letter, then according to the alphabetical font of each letter comprised in alphabetical sequence, carrys out the square font of combination producing alphabetical sequence.
When alphabetical sequence only comprise one alphabetical time, using an alphabetical alphabetical font as the square font of alphabetical sequence.
This system can also comprise initial character library generating apparatus, and after square font generating apparatus generates square font, initial character library generating apparatus can generate initial character library according to generated square font, using the basis as generation font character library.
Initial character library generating apparatus can carry out the profile of matching square font according to square font, thus generates initial character library.
The single replacement of the replacement sublist in inking device configuration layout table and fit replacement, single replacement makes identical letter replace with identical alphabetical font, and fit replacement makes alphabetical sequence replace with the square font corresponding with it.Wherein capitalization and lowercase are considered as described identical letter.
According to a third aspect of the invention we, additionally provide a kind of text editing system, it is provided with font character library that method according to a first aspect of the invention generates or the font character library that system according to a second aspect of the invention generates.
In the present invention, have employed OpenType word-base technology, realize the specific function of this font character library.Adopt the font character library that this word-base technology is made, be arranged on support OpenType character library generic text software for editing on after, Set font is become this font character library, selects English input method input alphabet sequence, just directly can show corresponding square font; Also can be this font character library by the Set font of alphabetical sequence text, each alphabetical sequence in article shows with the square font of correspondence, and can printout, shortens the time of this type of book publishing greatly.
Embodiment
Below in conjunction with embodiment and accompanying drawing, the method and system to the generation font character library according to embodiment of the present invention is described in detail.
In the present invention, " alphabetical sequence " can comprise one or more letter, and this alphabetical sequence can be English word, but is not limited to English word.This alphabetical sequence can relate to the spelling of any letter, as the Chinese phonetic alphabet etc.
In the present invention, " square font " is the square calligraphy font of the likeness in form Chinese character formed by adopting Chinese calligraphy pen type to alphabetical sequence.
First with reference to Fig. 1, the method according to the generation font character library of embodiment of the present invention will be described.
In a step 101, the square font of the alphabetical sequence be made up of one or more letter is generated.This square font can be formed by the mode of writing, can certainly by other means, such as, by the mode of computer disposal.
According to an embodiment of the invention, the alphabetical font of all letters can be formed, and according to the letter that alphabetical sequence comprises, be carried out the square font of combination producing alphabetical sequence by the font of included letter.But when alphabetical sequence only comprise one alphabetical time, the font of this letter can be adopted to be used as the square font of alphabetical sequence, or directly to present with the form of letter own.
When written word auxiliary sequence, each letter can corresponding a kind of Chinese calligraphy pen type structure, and each letter can be combined into the square calligraphy font of a likeness in form Chinese character with the Chinese calligraphy pen type that its spelled letter is corresponding then.
Such as, see Fig. 2, show the alphabetical font figure of each letter in English word " ArtWorld ".In figure 3, the corresponding square font figure of English word " ArtWorld " is shown.In Figure 5, the corresponding square font figure of " art circles " Chinese phonetic alphabet is shown.As long as should be appreciated that and be applicable to, by any alphabetical sequence of Chinese calligraphy pen type combination forming like the square font of Chinese character, all be applicable to the present invention.
In step 103, the corresponding relation between the square font setting up each alphabetical sequence and be made up of this each alphabetical sequence.By corresponding relation therebetween, when inputting or select certain alphabetical sequence, the square font corresponding with it will be shown.If in a step 101, not for certain alphabetical sequence forms square font, then directly show former alphabetical sequence.
At step 104, the layout table information in configuration OpenType character library, this layout table information can comprise the information such as relevant text, language, feature.
In an embodiment of the invention, capitalization may be adopted to represent for same alphabetical sequence, lowercase also may be adopted to represent, or adopt upper and lower case letter mixing.As shown in Figure 4, three kinds of method for expressing are given for English word " ArtWorld ".But in the present invention, can not distinguish the upper and lower case letter of alphabetical sequence, that is, for same alphabetical sequence, no matter its letter is capitalization or small letter, or adopts capital and small letter mixing, all adopts same alphabetical font to represent identical letter.Such as, although show in different capital and small letter modes the English word " ArtWorld " that font is the Song typeface in the diagram, the letter in the different English word " ArtWorld " represented can adopt the alphabetical font shown in Fig. 2.Like this when generating square font, different " ArtWorld " represented generates same square font as shown in Figure 3.Certainly, in the embodiment shown in Fig. 2-4, also can distinguish upper and lower case letter, be expressed as different alphabetical fonts, thus form different square fonts.
In an embodiment of the invention, the feature of comprehensive this type of calligraphy of analysis can utilize the single replacement in the replacement sublist in advanced layout's table (the current character another one character glyphs display of input) and fit replacement (multiple characters of input show by a character glyphs) to realize, wherein single replacement realizes the capital and small letter identical characters of same letter to show, and the fit square font realized corresponding for its alphabetical sequence of alphabetical sequence of replacing shows.
In step 105, font character library is generated.The corresponding relation set up in step 103 and the layout table information configured at step 104 are added in character library, thus generates OpenType font character library.
In addition, according to an embodiment of the invention, step 102 can also be comprised.In a step 102, initial character library is generated.When generating this initial character library, the square font generated by step 101 is simulated character outline and makes initial character library.According to an embodiment of the invention, if in a step 101, generated the square font of alphabetical sequence by ways of writing, then the word original text write is scanned, fit to character outline to generate initial character library.In addition, after matching place character outline, can also to be tested refine by font design personnel.The initial character library generated is as the basis of post-production font character library.
According to the present invention, the Chinese calligraphy pen type that each alphabetical sequence can be corresponding is combined into the square font of a likeness in form Chinese character, and this font does not have Unicode code, only has the index information of this kind of character in character library.It should be noted that, in OpenType character library, the text related in sublist replaced in font, language, the information such as feature, must be consistent with the inputting character code relating to font replacement, and feature also wants consistent with the text of definition, because similar word, this kind of text edit software of txt, bottom text interpretation device is and text that language is associated.Such as in certain situation, what input is all English alphabet, belong to Latin text, language adopts default language, select inside the feature that font variant feature defines at Latin, be this distortion supporting such calligraphy character library completely through test on the text editor supporting Latin OpenType character library.
Further, for making the present invention, there is better effect, should the square calligraphy font that forms of written word auxiliary sequence as much as possible, this will present with the alphabetical font of alphabetical sequence own mainly because when the alphabetical sequence of input does not exist corresponding square calligraphy font in character library.
Therefore, the present invention can use the perfection of OpenType word-base technology to solve the particular demands of this type of the special character library of square calligraphy font written word auxiliary sequence utilizing likeness in form Chinese character.Adopt the character library made of this method, can normal use as other character libraries, show and print
With reference to Fig. 6, show the theory diagram of the system of the generation font character library according to embodiment of the present invention.This system comprises square font generating apparatus 601, corresponding relation creation apparatus 603, inking device 604 and font character library generating apparatus 605.
In square font generating apparatus 601, generate the square font of the alphabetical sequence be made up of one or more letter.Certainly, the present invention also can form square font by the mode of writing.
According to an embodiment of the invention, the alphabetical font of all letters can be formed, and according to the letter that alphabetical sequence comprises, be carried out the square font of combination producing alphabetical sequence by the font of included letter.But when alphabetical sequence only comprise one alphabetical time, the font of this letter can be adopted to be used as the square font of alphabetical sequence, or to present with the form of letter own.
In corresponding relation creation apparatus 603, set up each alphabetical sequence and corresponding relation between the square font be made up of this each alphabetical sequence.By corresponding relation therebetween, when inputting or select certain alphabetical sequence, the square font corresponding with it will be shown.If in square font generating apparatus 601, not for certain alphabetical sequence forms square font, then directly show former alphabetical sequence.
In inking device 604, the layout table information in configuration OpenType character library, this layout table information can comprise the information such as relevant text, language, feature.
In an embodiment of the invention, capitalization may be adopted to represent for same alphabetical sequence, lowercase also may be adopted to represent, or adopt upper and lower case letter mixing.But in the present invention, can not distinguish the upper and lower case letter of alphabetical sequence, that is, for same alphabetical sequence, no matter its letter is capitalization or small letter, or adopts capital and small letter mixing, all adopts same alphabetical font to represent identical letter.
In an embodiment of the invention, the feature of comprehensive this type of calligraphy of analysis can utilize the single replacement in the replacement sublist in advanced layout's table (the current character another one character glyphs display of input) and fit replacement (multiple characters of input show by a character glyphs) to realize, wherein single replacement realizes the capital and small letter identical characters of same letter to show, and the fit square font realized corresponding for its alphabetical sequence of alphabetical sequence of replacing shows.
In font character library generating apparatus 605, generate font character library.The layout table information that the corresponding relation set up corresponding relation creation apparatus 603 and inking device 604 configure is added in character library, thus generates OpenType font character library.
In addition, according to an embodiment of the invention, initial character library generating apparatus 602 can also be comprised.Initial character library generating apparatus 602 generates initial character library.When generating this initial character library, the square font generated by square font generating apparatus 601 is simulated character outline and makes initial character library.
Should be appreciated that above embodiment is only exemplary herein, but not be to limit the scope of the invention.For a person skilled in the art, when not departing from spirit of the present invention and forefinger, various modification and improvement can be made, but these modification and improvement also should be considered as falling among protection scope of the present invention.