remove hspace between punctuation and CJK character.
[chise/omega.git] / inCHISE
diff --git a/inCHISE b/inCHISE
index c2d2ebe..cc5382e 100755 (executable)
--- 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{