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{