From: imiyazaki Date: Sun, 9 Nov 2003 04:08:10 +0000 (+0000) Subject: fix handling of unified characters. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ac171ff9ca20909db2c8dcf6b2472845c02f4d6;p=chise%2Fomega.git fix handling of unified characters. --- diff --git a/inCHISE b/inCHISE index 8467c79..393007a 100755 --- a/inCHISE +++ b/inCHISE @@ -185,33 +185,35 @@ while(<>){ }else{ if(($out_char=&get_output_char($char,$out_cs))){ print $out_char,&add_break($i); - }elsif($opt_allow_unify){ - @chars_unified=&get_chars_unified($char); - if(@chars_unified>0){ - foreach $char_unified (@chars_unified){ - if(($out_char - =&get_output_char($char_unified,$out_cs))){ - print $out_char,&add_break($i); - next CHAR; + }else{ + if($opt_allow_unify){ + @chars_unified=&get_chars_unified($char); + if(@chars_unified>0){ + foreach $char_unified (@chars_unified){ + if(($out_char + =&get_output_char($char_unified,$out_cs))){ + print $out_char,&add_break($i); + next CHAR; + } } } } - }elsif($char_id >= 0x20000 && $char_id <=0x2a6df){ - # CJK Unified Ideographs Extension B - if(not defined($ids{$char}) and $ids{$char}[1]>=0){ - $ids{$char}[0]=$font_start; - $ids{$char}[1]=$ids_start; - $ids_start++; - if($ids_start>255){ - $ids_start=0; - $font_start++; + if($char_id >= 0x20000 && $char_id <=0x2a6df){ + # CJK Unified Ideographs Extension B + if(not defined($ids{$char}) and $ids{$char}[1]>=0){ + $ids{$char}[0]=$font_start; + $ids{$char}[1]=$ids_start; + $ids_start++; + if($ids_start>255){ + $ids_start=0; + $font_start++; + } } + print "{\\fontencoding{OT1}\\fontfamily{" . + sprintf("chise%03d",$ids{$char}[0]) . + "}\\selectfont\\char$ids{$char}[1]}",&add_break($i); + next CHAR; } - print "{\\fontencoding{OT1}\\fontfamily{" . - sprintf("chise%03d",$ids{$char}[0]) . - "}\\selectfont\\char$ids{$char}[1]}",&add_break($i); - next CHAR; - }else{ if($ids=&get_ids($char)){ print &get_macro_for_ids($ids),&add_break($i); }else{