From: imiyazaki Date: Sun, 27 Apr 2003 03:02:32 +0000 (+0000) Subject: fix add_break(). X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=a9057aa2c976d3a5f8e9a58cf82029b64f8de47b;p=chise%2Fomega.git fix add_break(). --- diff --git a/outCMAP b/outCMAP index b89182a..a886338 100755 --- 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{