From 34361ea3f734dbfee4ca114c94c1d61daa2f16da Mon Sep 17 00:00:00 2001 From: imiyazaki Date: Mon, 26 Jan 2004 16:23:40 +0000 Subject: [PATCH] remove hspace between punctuation and CJK character. change fontencoding for omlgc to OT1. --- inCHISE | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/inCHISE b/inCHISE index c2d2ebe..cc5382e 100755 --- a/inCHISE +++ b/inCHISE @@ -194,13 +194,21 @@ while(<>){ if($char_id<=0x20){ # add quarter space between asian and non-asian. if($i>0 and $i<$#chars){ - if((($chars[$i-1]=~/[$asian]/) - and($chars[$i+1]=~/[^$asian]/)) - or(($chars[$i-1]=~/[^$asian]/) - and($chars[$i+1]=~/[$asian]/))){ + if(($chars[$i-1]=~/[$asian]/ + and $chars[$i+1]=~/[^$asian]/ + and $chars[$i+1]=~/[^$strictly_forbidden_after$slightly_forbidden_after]/) + or($chars[$i-1]=~/[^$asian]/ + and $chars[$i+1]=~/[$asian]/ + and $chars[$i-1]=~/[^$strictly_forbidden_before$slightly_forbidden_before]/) + ){ + print ''; + }elsif(($chars[$i-1]=~/[$asian]/ + and $chars[$i+1]=~/[^$asian]/) + or($chars[$i-1]=~/[^$asian]/ + and $chars[$i+1]=~/[$asian]/)){ print '{\selectjisfont\hspace{.25ex}}'; }else{ - print '{\fontencoding{UT1}\fontfamily{omlgc}\selectfont{} }'; + print '{\fontencoding{OT1}\fontfamily{omlgc}\selectfont{} }';###UT1? } } next CHAR; @@ -391,7 +399,7 @@ sub latin_parse{ } $i++; } - return '{\fontencoding{UT1}\fontfamily{omlgc}\selectfont '.$out_str.'}'; + return '{\fontencoding{OT1}\fontfamily{omlgc}\selectfont '.$out_str.'}';###UT1? } sub ids_parse{ -- 1.7.10.4