summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-04-03 02:12:09 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-04-03 02:12:09 +0000
commitdfe83ffa91f66a5cbfc3caba0318ec47586883ed (patch)
tree710366fb4d12c6612d2a7d0939187c23f384a2ae
parentafbd83d4046a2274f88417f2b9b8c1a22a88fd9f (diff)
downloadredmine-dfe83ffa91f66a5cbfc3caba0318ec47586883ed.tar.gz
redmine-dfe83ffa91f66a5cbfc3caba0318ec47586883ed.zip
PDF: fix width calculation of multi byte character in Simplified and Traditional Chinese (#61).
Contributed by Jun NAITOH. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5295 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--vendor/plugins/rfpdf/lib/fpdf/chinese.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/plugins/rfpdf/lib/fpdf/chinese.rb b/vendor/plugins/rfpdf/lib/fpdf/chinese.rb
index e072e515c..94f8ee49d 100644
--- a/vendor/plugins/rfpdf/lib/fpdf/chinese.rb
+++ b/vendor/plugins/rfpdf/lib/fpdf/chinese.rb
@@ -210,7 +210,7 @@ module PDF_Chinese
#Automatic line break
if(sep==-1 or i==j)
if(i==j)
- i+=ascii ? 1 : 3
+ i+=ascii ? 1 : 2
end
Cell(w,h,s[j,i-j],b,2,align,fill)
else
@@ -225,7 +225,7 @@ module PDF_Chinese
b=b2
end
else
- i+=ascii ? 1 : 3
+ i+=ascii ? 1 : 2
end
end
#Last chunk
@@ -294,7 +294,7 @@ module PDF_Chinese
next
end
if(i==j)
- i+=ascii ? 1 : 3
+ i+=ascii ? 1 : 2
end
Cell(w,h,s[j,i-j],0,2,'',0,link)
else
@@ -311,7 +311,7 @@ module PDF_Chinese
end
nl+=1
else
- i+=ascii ? 1 : 3
+ i+=ascii ? 1 : 2
end
end
#Last chunk