--- a/rfpdf/lib/fpdf/japanese.rb 2011-01-25 17:50:48.000000000 -0500 +++ b/rfpdf/lib/fpdf/japanese.rb 2011-03-23 17:46:19.000000000 -0400 @@ -103,7 +103,7 @@ o=s[i] if(o<128) #ASCII - l+=cw[o.chr] + l+=cw[o.chr] if cw[o.chr] i+=1 elsif(o>=161 and o<=223) #Half-width katakana @@ -146,13 +146,9 @@ b2='LR' else b2='' - if(border.index('L').nil?) - b2+='L' - end - if(border.index('R').nil?) - b2+='R' - end - b=border.index('T').nil? ? b2+'T' : b2 + b2='L' unless border.to_s.index('L').nil? + b2=b2+'R' unless border.to_s.index('R').nil? + b=(border.to_s.index('T')) ? (b2+'T') : b2 end end sep=-1 @@ -163,7 +159,7 @@ while(i