From 1ac171ff9ca20909db2c8dcf6b2472845c02f4d6 Mon Sep 17 00:00:00 2001 From: imiyazaki Date: Sun, 9 Nov 2003 04:08:10 +0000 Subject: [PATCH] fix handling of unified characters. --- inCHISE | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) 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{ -- 1.7.10.4