Can carry out Chinese character input, editor, composing, printout on computers or send a manuscript to the compositor the preceding film of seal for solving 100,000 Chinese characters, just 100,000 Chinese character basies must be arranged, this is the basis that Chinese character shows, prints.In addition, also the input method that can import 100,000 Chinese characters must be arranged, editor, composing back-up system.
Therefore, must solve three gordian techniquies.The firstth, the computer manufacture system of advanced curve description Chinese character font, i.e. coinage system; The secondth, can import the input method of 100,000 Chinese characters; The 3rd is the Chinese character software for editing that can handle 100,000 Chinese characters.
The coinage system
During exploitation coinage system, difficult point is that foreign data only discloses the theoretical algorithm of describing English alphabet with cubic curve, but does not disclose the designing technique of English coinage system.The applicant has designed curve Chinese character algorithm voluntarily, has finished designing and developing of computing machine coinage system, and constantly upgrading improvement in use.
The descriptor format that meets international TrueType quafric curve by the curve Chinese character of this coinage system making.The profile of each Chinese character is by some Bezier quafric curves and rectilinear(-al), and the Bezier quafric curve is actually the shape of being described curve by starting point, end point, three points of intermediate controlled point.These three points are called the reference mark here.Straight line is to be described by starting point, two reference mark of end point.The coinage system consists of the following components:
1. each bar profile curvature of a curve of mobile reference mark scalable, and the length of scalable each stroke, width, gradient and curvature;
2. for every kind of font, to make several thousand Chinese character parts that differ in size in advance, enroll coding (for example, Zheng's sign indicating number) for then each parts, after parts are pressed coding and sorting order, call parts apace with regard to available code it is pieced together the whole word of various different fonts.Such as Song, imitation Song-Dynasty-style typeface, pattern, font such as black are arranged;
3. in the process of mosaic, can move or rotate parts, and can its size of electrodeless convergent-divergent, with adjust the font center of gravity steadily;
4. also can call the finished product Chinese character of refine with coding (as Zheng's sign indicating number), get its some parts and come the new Chinese character of amalgamation.Because the finished product word is through the multipass refine, parts wherein are than initial independent parts quality height.This technology not only makes coinage efficient improve greatly, and has guaranteed the precision of institute's coinage and attractive in appearance to greatest extent.
Input method of Chinese character
In preferred forms of the present invention, adopt the coding of Zheng's sign indicating number as Chinese character or Chinese character parts, this be because, as a kind of Chinese character input method easily and efficiently, Zheng's sign indicating number can be encoded to Chinese character more than 20,000 and Chinese character parts, thereby 20,000 above Chinese characters or Chinese character parts can be input in the computing machine.In the making project, Zheng's code inputting method is used widely before relating to the seal of large character set.
Certainly, if other input method of Chinese character can be encoded to Chinese character more than 20,000 and Chinese character parts, also can adopt such input method of Chinese character.
The Chinese character software for editing
Use for the ease of the user, in the best mode for carrying out the invention, with Microsoft Word as the Chinese character software for editing.Existing Microsoft Word 95/97/2000 supports 21,003 Chinese characters.In Microsoft Word,, can utilize font that the font that order changes relevant Chinese character is set in conjunction with True Type character library paging technique.
Certainly, if other Chinese character softwares for editing also can utilize True Type Chinese word library paging technique to change Chinese character style, also can adopt such Chinese character software for editing.
Preferred forms of the present invention, integrate Zheng's code inputting method, 100,000 Chinese character basies, coinage system, Microsoft Word, solved the support technology that computing machine is handled 100,000 Chinese characters, guarantee that 100,000 Chinese characters can correctly import computing machine, and correctly handled according to user's needs.
Specifically, the present invention combines Microsoft Word API technology, True Type Chinese word library paging technique and Zheng's code inputting method dexterously, realize by ultra-large type input method of Chinese character administration module, this ultra-large type input method of Chinese character administration module can directly be controlled Microsoft Word95/97/2000, reaches the functions such as input, output, composing and electronic retrieval of handling 100,000 Chinese characters.
In a kind of specific implementation, ultra-large type input method of Chinese character administration module is synthetic by three parts: first is the setting of input method function; Second portion is the soft keyboard input; Third part is the input of ultra-large type Hanzi keyboard.
The setting of input method function, comprise 100,000/20,000 switch, in/English punctuate switchings, full-shape/half-angle switchings, Chinese and English switching, verbal association, word input, prompting gradually, outer yard are pointed out, cursor is followed nine settings, be listed below one by one below:
1. 100,000/20,000 switch: switch with the Ctrl+Tab key, and when " 20,000 " when function is effective,
Only import 21003 Chinese characters, otherwise can import 100,000 Chinese characters;
2. in/and English punctuate switching: keyboard Ctrl+. (fullstop) key switches, at English punctuate
Under the state, all punctuates are corresponding one by one with keyboard.Under Chinese punctuate state, Chinese punctuate symbol
Number as follows: " suspension points ... " correspondence " ^ " with the contrast relationship of keyboard; " dash---"
Corresponding "-"; " pause mark, " correspondence "/"; " separation dot " correspondence " @ "; " hyphen-"
Corresponding “ ﹠amp; "; " Renminbi symbol $ " correspondence " $ "; Other punctuates are corresponding one by one with keyboard;
3. full-shape/half-angle switches: keyboard Shift+Space key switches, and the letter of importing under the full-shape state is the double byte width, otherwise is byte;
4. Chinese and English switches: keyboard Caps Lock key or Ctrl+Space key switch;
5. verbal association: behind the input words, point out out candidate's word automatically with current words beginning;
6. word input: allow/forbid the word input;
7. prompting gradually: prompting is meant in candidate's window and shows that all with word and speech that input symbols begins, select to make things convenient for the user, gradually prompting gradually " when not being provided with, key in effective code element after, as do not have repeated code, screen directly gone up in Chinese character.If any repeated code, in candidate's window, show repeat code Chinese character.
8. outer sign indicating number prompting: outer sign indicating number prompting is meant its besides sign indicating number that shows words that all begin with input symbols in candidate's window, to make things convenient for user learning." outer sign indicating number prompting " only just works effectively down in " prompting gradually ";
9. cursor is followed: cursor is followed and be meant that outer sign indicating number window and candidate's window occur and follow cursor automatically moving all the time near the input cursor, so that the user has good visual effect when input in Chinese.
The input of soft keyboard comprises the input of totally ten three symbols of Standard PC keyboard, Greek alphabet, Russion letter, phonetic symbol, phonetic, Hiragana, Japanese katakana, punctuation mark, digital number, mathematic sign, unit symbol, tab, special symbol.
The input of ultra-large type Hanzi keyboard, this technology are gordian techniquies of the present invention, and it combines Microsoft Word API technology, True Type Chinese word library paging technique and " Zheng's sign indicating number " method of Chinese character coding.
True Type Chinese word library paging technique is the applicant's a practical technique, is limited to present Word and can only handles 21003 Chinese characters, must be divided into 5 pages to 100,000 Chinese characters, specifically being allocated as follows of the page:
1. ultra-large type input method internal distribution.
Wherein first page is two byte representations, with current GBK standard be on all four, the 2nd~5 page is that nybble is represented in input method inside, preceding two bytes are respectively with sexadecimal number D7FA, D7FB, D7FC, D7FD represent that (these four sexadecimal numbers are actually undefined yard position in the GBK standard code position, we represent four pages respectively with this four number), latter two byte GBK standard code bit representation.
2. the distribution of character library.
Form by five character libraries, each character library comprises 20,000 Chinese characters, each character library comprises the Chinese character of a page, wherein the character library of first page is the character library of system own, the character library of the 2nd~5 page is 100,000 character libraries (removing 21003 Chinese characters of system) that the ultralarge Chinese character information disposal system provides, what these character libraries took is GBK standard code position, distinguish the method for 100,000 character libraries and determine that according to the character library title character library title of 2-5 the page is respectively " SuperSong1 ", " SuperSong2 ", " SuperSong3 ", " SuperSong4 ".Though the sign indicating number position that 2-5 page used is the GBK sign indicating number, the Chinese character that deposit each yard position is different, and as a same GBK sign indicating number 0xd2bb, that put at first page is Chinese character " one ", but second page put be "
" word, what put at the 3rd page is again the another one Chinese character.
3. the distribution of the page in Microsoft Word.
When the ultra-large type input method when Microsoft Word sends Chinese character, if the Chinese character of first page just directly sends to Microsoft Word; If the Chinese character of 2-5 the page, because being nybble, the input method internal distribution represents, by this Chinese character place page of preceding two byte decidables, further can determine the font number at this Chinese character place, so when Microsoft Word sends Chinese character, send the font information of this Chinese character earlier, send latter two byte then.
Trile Type Chinese word library paging technique basis has been arranged, just must directly control the current display font of Word, could handle 100,000 Chinese characters in the automatic paging of the inner realization of input method.The applicant controls Word by Mierosoft Word API.
Microsoft Word API is the kit (Microsoft WordDeveloper ' s Kit) of the Word of Microsoft development interface, can carry out redevelopment to Word by this kit, i.e. the part of may command Word composing, editting function.In Windows, can set up the plug-in unit of independently special dynamic link libraries (WLL), thereby strengthen the function of Word as Word.This WLL can call Word API, but this WLL must be installed in the sub-directory at the grand place of WordBasic and could be called by Word.Like this, we can not directly control Word, also just do not reach the purpose that 100,000 Chinese characters all enter computing machine.Through overtesting and exploration, found a kind of method finally, can solve the problem of direct control Word.Because input method administration module (IME) itself is exactly a dynamic link libraries, though be not installed in the sub-directory at the grand place of WordBasic, but when using Word, import Chinese character if desired, just must call the input method administration module, that is to say, in Word, open the input method administration module special WLL storehouse that has been equivalent to pack into, so, also can call Word API, thereby purpose of late directly control Word by this input method administration module.
Control the Chinese character display font of the current input of Word, the method for ultra-large type input method administration module control Word is as follows:
1. initialization Word command buffer (InitWCB function); This function calls is described as follows:
void?InitWCB(WCB?far
*lpwcb,
ushort?retType,
LPUCHAR?lpBuffer,
ushort?cBufferSize);
The lpwcb--Word command buffer
(TypeString: character string, the TypeShort:16 position is whole for the retType--command type
Number, TypeLong:32 position integer, TypeVoid: the void class in the suitable C language
Type)
The lpBuffer--return string
The length of cBufferSize--return string
2. add the Word command parameter;
void?AddStringParam(WCB?far
*lpwcb,
LPUCHAR?lpStr);
The lpwcb--Word command buffer
The character string that lpStr--adds (font name that in this invention, adds)
3. carry out Word order (WORDCALL function).
void?WORDCALL(short?CommandID);
CommandID--Word orders code name, and wherein code name " wdFont " is the order code name that current font name is set.
True Type Chinese word library paging technique and " Zheng's sign indicating number " method of Chinese character coding have been arranged, in conjunction with Microsoft Word API technology, just can realize the input of ultra-large type Hanzi keyboard again.
The input method of ultra-large type Hanzi keyboard is as follows:
1. analyze the key assignments of input, confirm whether key assignments is Zheng's sign indicating number coding A-Z;
2. show candidate words.During Chinese character in candidate is GBK, show this Chinese character with Song typeface, when being word beyond the GBK, candidate then shows by the paging character library, because the input method internal distribution is that nybble is represented, by this Chinese character place page of preceding two byte decidables, further can determine the font number at this Chinese character place,, show this Chinese character with two syllabified codes then so call SelectFont command selection font name for the font name under this Chinese character;
3. confirm that enter key is options button ' 0 '-' 9 ' or space bar;
4. confirm current calling program,, then call Word API the paging font is set that the character that sends input is to calling program, otherwise directly send the character imported to calling program if be Word95/97.
Said process is shown in greater detail among Fig. 4, does not repeat them here.
Fig. 1 shows the general structure of ultralarge Chinese character information disposal system.
Fig. 2 illustrates the process flow diagram of coinage system, and this coinage system finishes the instrument of 100,000 Chinese character basies.
Fig. 3 is Microsoft Word 95/97 an interface process flow diagram.Comprise three little modules among this figure, wherein " input method is called the Word order " is the interfacing of ultra-large type Chinese character load module and Word, " super look-up command " is that the specific command " super font order (SuperFont) " of searching 100,000 Chinese characters among the Word is the macros that is embedded among the Word, when its purpose is to change the Chinese character style title, do not change the font name of the 2nd~5 page, otherwise will change to first page to the Chinese character of the 2nd~5 page, demonstration be original Chinese character no longer.The performing step of this order is as follows:
1. judge the Chinese character that whether contains the 2nd~5 page in the selected character string;
2. when containing the Chinese character of the 2nd~5 page, do not change font, otherwise be made as selected font.
Be the source code of SuperFont macros below:
Dim lastElement Dim count_ Dim theResult Dim theFont$ Dim iLastFont$ Dim iFontCount Dim fontarray() As String lastElement=WordBasic.CountFonts()-1 ReDim fontarray(lastElement)As String For count_=0 To lastElement Select Case WordBasic.[font$](count_+1) Case"SuperSong1"<!-- SIPO <DP n="8"> --><dp n="d8"/> iFontCount=iFontCount+1 Case"SuperSong2" iFontCount=iFontCount+1 Case"SuperSong3" iFontCount=iFontCount+1 Case"SuperSong4" iFontCount=iFontCount+1 Case"SuperSong5" iFontCount=iFontCount+1 Case Else fontarray(count_-iFontCount)=WordBasic.[font$](count_+1) End Select Next
" super look-up command (SuperFind) " is the macros that is embedded among the Word.Its purpose is accurately to find 100,000 Chinese characters of the 1st~5 page, directly use the Find command among the Word, if look for the Chinese character of first page, just seek when cause is searched, may find the 2nd~5 the another one Chinese character (its ISN is the same with the Chinese character of searching) in the page according to its ISN.So must provide one " super look-up command (SuperFind) " to solve this problem.
The performing step of this order is as follows:
1. in the SuperFind dialog box, import the Chinese character that to look for;
2. return the ISN that to look for Chinese character;
3. return the font name that to look for Chinese character;
4. find Chinese character by following source program;
Selection.Find.ClearFormatting With Selection.Find .Text=txtFind.Text (Chinese character that will look for) .Replacement.Text=" " .Forward=True Select Case iSearchScope<!--SIPO<dP n="9">--<dp n="d9"/>Case0 .Forward=True .Wrap=wdFindContinue Case1 .Forward=True .Wrap=wdFindAsk Case2 .Forward=False .Wrap=wdFindAsk End Select .Format=True If strFName ◇"MS Sans Serif"Then .Font.NameFarEast=strFName () Else .Font.NameFarEast="" End If .MatchCase=False .MatchWholeWord=False .MatchWildcards=False .MatchSoundsLike=False .MatchAllWordForms=False .MatchByte=TrueEnd WithiResult=Selection.Find.ExecuteIf iResult=True Then iSearched=iSearched+1End IfIfiSearched=0 Then MsgBox"! "<!--SIPO<dP n="10">--<dp n="d10"/>End If
In order to understand the present invention vividerly, provide a real example below.
The font name of second to the 5th page is made as " SuperSong1 ", " SuperSong2 ", " SuperSong3 ", " SuperSong4 " respectively in " in the ultralarge Chinese character information disposal system ", and the font of first page is selected system's installed fonts for use.
Operation Wbrd software switches to " super Zheng's sign indicating number " input method then in Windows 95/98/NT.
Import a Chinese character, when 20,000 Chinese character input modes, if key in " a ", key in space bar again, that select is Chinese character " one ", but the code that obtains Chinese character " " in ultra-large type Chinese character load module inside is two byte 0xd2bb, and load module is directly issued Word with the two syllabified code 0xd2bb of " one " word; When switching to input 100,000 Chinese modes with the Ctrl+Tab key, " surpassing " prompts for redness, at this moment can import GBK Chinese character in addition, key in " iaia ", prompting at this moment " 1: uncle 2:
3:
", knock in " 2 " key, choose "
" word, at this moment obtain in ultra-large type Chinese character load module inside "
" the nybble code of word is 0xd7fad2bb, front two syllabified codes are 0xd7fa, can be judged to be the Chinese character of second page, so the current font of Word is made as " SuperSong1 ", the step that current font is set is:
a.WCB?wcb;
b.InitWCB(&wcb,TypeVoid,NULL,0);
c.AddStringParam(&wcb,“SuperSong1”);
d.WORDCALL(wdFont);
To then "
" the back two byte 0xd2bb of word issue Word, at this moment Word will with pairing Chinese character of GBK ISN 0xd2bb in " SuperSong1 " "
" show.
1. search a Chinese character, select " SuperFind " order, in searching content, import Chinese character "
", find this word in the above in the content that will import.If directly use the Find command among the Word, in searching content, import Chinese character " ", then can find " one " and "
" two words, this and the actual content that will look for are not inconsistent, think and increased " SuperFind " order that is embedded among the Word in " ultralarge Chinese character information disposal system " by 100,000 Chinese characters of searching beyond the GBK;
2. the conversion font name selects " one
" two Chinese characters, use " SuperFont " order, selecting font is " black matrix ", selected content just becomes " one
".If directly use " font " order among the Word, the same font of selecting is " black matrix ", and selected content just becomes " one by one ".This and real transform effect are not inconsistent, think that the Chinese character that guarantees beyond the GBK can not make mistakes when the conversion font name, in " ultralarge Chinese character information disposal system ", increased " SuperFont " order that is embedded among the Word.
As mentioned above, describe preferred forms of the present invention in detail, and provided a real example.Below in conjunction with Fig. 5 and Fig. 6 Chinese character information treating device of the present invention and method are done a summary.
Fig. 5 shows the schematic construction of Chinese character information treating device of the present invention.
In Fig. 5, label 501 representatives are used to receive the receiving trap of Hanzi inputing code; Label 502 representatives are used for judging that according to input code Chinese character to be imported is the judgment means of standard Chinese character or expansion Chinese character; Label 503 is represented first conversion and the dispensing device, is used for when judgment means 502 is judged Chinese character to be imported and is standard Chinese character, and input code is converted to the internal code of Chinese character, and internal code is sent to the word processing module; Label 504 is represented second conversion and the dispensing device, being used for judging Chinese character in judgment means 502 is when expanding Chinese character, input code is converted to corresponding expansion character library identification code and the internal code of waiting to import Chinese character, the font that sends corresponding to this expansion character library identification code to the word processing module is provided with order then, and to word processing module transmitter ISN; Label 505 is represented the word processing module; Label 506 is represented standard character library/expansion character library.
Word processing module 505 comprises being used for from second conversion with after dispensing device 504 receives that font is provided with order and internal code, and according to internal code, the character library (promptly expanding character library) that identifies from expansion character library identification code is obtained the device of font information.The font information that is obtained can and then pass to display device or printing equipment (not shown) so that show or print.
Word processing module 505 also comprises and is used for only changing the font of standard Chinese character and does not change the device of font of expansion Chinese character.
Word processing module 505 can also comprise and is used to judge that the Chinese character of being searched is the device of standard Chinese character or expansion Chinese character; And
The device that the Chinese character that is used for searching judging utilizes the expansion character library to search when being the expansion Chinese character.
Chinese character information after word processing module 505 is handled can export other devices to and do further processing, such as storage, demonstration, printing etc.
Standard character library/expansion character library 506 has a plurality of pages, in its page, stored the font information of standard Chinese character, and in other a plurality of pages, stored the font information of expanding Chinese character, wherein the different pages of storage expansion Chinese character ideographic information are by different expansion character library identification code signs.
Fig. 6 illustrates the process flow diagram of Chinese character information processing method of the present invention.
Step 601 receives Hanzi inputing code.
Step 602 judges that according to input code Chinese character to be imported is a standard Chinese character.
If the judged result of step 602 then proceeds to step 606 for being, otherwise proceeds to step 603.
Step 606 is converted to Chinese internal code with input code, proceeds to step 605 then.
Step 603 is converted to corresponding expansion character library identification code and Chinese internal code with input code.
Step 604, the font that sends corresponding to expansion character library identification code to the word processing module is provided with order.
Step 605 to word processing module transmitter ISN, is returned step 601 then.
The word processing module according to internal code, is obtained font information from the character library of expansion character library identification code sign after receiving that font is provided with order and described internal code.
The word processing module can also be carried out following steps: when the font of the Chinese character that changes typing, only change the font of standard Chinese character, and do not change the font of expansion Chinese character; And when searching the Chinese character of typing, judge that at first the Chinese character of being searched is standard Chinese character or expansion Chinese character, if the Chinese character of being searched is the expansion Chinese character, then utilize the expansion character library to search.
In addition, can construct a plurality of Chinese character basies that comprise a plurality of pages in advance by following steps, the font information of storage standards Chinese character in a page of Chinese character base, this page comprises and meets GB2312-80, Song of GB13000.1 and GB18030-2000, imitative, pattern, black four kinds of curve character libraries, and in other a plurality of pages the font information of storage expansion Chinese character, the different pages of storage expansion Chinese character ideographic information are by different expansion character library identification code signs, and the expansion character library contains and meets SuperCJK standard 68000 Chinese character Song, the two kinds of curve character libraries of pattern and the 100000 curve Song typefaces, the regular script character library.
Though illustrated and described better embodiment of the present invention in detail, will be appreciated that and to make variations and modifications to the present invention and do not break away from the scope of claims.