fix add_break().
authorimiyazaki <imiyazaki>
Sun, 27 Apr 2003 03:02:32 +0000 (03:02 +0000)
committerimiyazaki <imiyazaki>
Sun, 27 Apr 2003 03:02:32 +0000 (03:02 +0000)
outCMAP

diff --git a/outCMAP b/outCMAP
index b89182a..a886338 100755 (executable)
--- a/outCMAP
+++ b/outCMAP
@@ -210,33 +210,43 @@ sub tex_de_er{
 sub add_break{
     my($i)=@_;
 
-    if($i<$#chars){
-       if($i<($#chars-1)){
-           if(($chars[$i+1]=~m/[$strictly_forbidden_before]/o)
-              and($chars[$i+2]=~m/[^$strictly_forbidden_before]/o)){
-               return "\\CJKunbreakablekernone \\CJKprotrude ";
-           }elsif(($chars[$i+1]=~m/[$strictly_forbidden_before]/o)
-              and($chars[$i+2]=~m/[$strictly_forbidden_before]/o)){
-               return "\\CJKunbreakablekernone ";
-           }
-       }
-       if($chars[$i+1]=~m/[$strictly_forbidden_before]/o){
-           return "\\CJKunbreakablekernone ";
-       }elsif($chars[$i+1]=~m/[$forbidden_before]/o){
-           return "\\CJKunbreakablekerntwo ";
-       }elsif($chars[$i+1]=~m/[$slightly_forbidden_before]/o){
-           return "\\CJKunbreakablekernthree ";
-       }
-    }elsif($i>0){
-       if($chars[$i]=~m/[$forbidden_after]/o){
-           return "\\CJKunbreakablekerntwo ";
-       }elsif($chars[$i]=~m/[$strictly_forbidden_after]/o){
+    if($i<($#chars-1)){
+       if(($chars[$i+1]=~m/[$strictly_forbidden_before]/o)
+          and($chars[$i+2]=~m/[$strictly_forbidden_before]/o)){
            return "\\CJKunbreakablekernone ";
-       }elsif($chars[$i]=~m/[$slightly_forbidden_after]/o){
-           return "\\CJKunbreakablekernthree ";
+       }elsif(($chars[$i+1]=~m/[$strictly_forbidden_before]/o)
+              and($chars[$i+2]=~m/[^$strictly_forbidden_before]/o)){
+           return "\\CJKunbreakablekernone \\CJKprotrude ";
        }
     }
-    return "\\CJKbreakablekern ";
+    if(($i<$#chars)
+       and($chars[$i+1]=~m/[$strictly_forbidden_before]/o)){
+       return "\\CJKunbreakablekernone ";
+    }
+    if($chars[$i]=~m/[$strictly_forbidden_after]/o){
+       return "\\CJKunbreakablekernone ";
+    }
+    if(($i<$#chars)
+       and($chars[$i+1]=~m/[$forbidden_before]/o)){
+       return "\\CJKunbreakablekerntwo ";
+
+    }
+    if($chars[$i]=~m/[$forbidden_after]/o){
+       return "\\CJKunbreakablekerntwo ";
+    }
+    if(($i<$#chars)
+       and($chars[$i+1]=~m/[$slightly_forbidden_before]/o)){
+       return "\\CJKunbreakablekernthree ";
+    }
+    if($chars[$i]=~m/[$slightly_forbidden_after]/o){
+       return "\\CJKunbreakablekernthree ";
+    }
+    if($chars[$i]=~m/[$asian]/o){
+       return "\\CJKbreakablekern ";
+    }
+    if(($i<$#chars)and($chars[$i+1]=~m/[$asian]/o)){
+       return "\\CJKbreakablekern ";
+    }
 }
 
 sub ids_rest{