From e35e04de8e615d9b1bcb0e7bc72012fdd18def7e 2011-04-01 01:26:38 From: Toshi MARUYAMA Date: 2011-04-01 01:26:38 Subject: [PATCH] PDF: fix the width of the ASCII character of Japanese PDF (#7794). r5256 in trunk has this change. So, there is no need to commit in trunk. Contributed by Jun NAITOH. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@5271 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/vendor/plugins/rfpdf/lib/rfpdf/japanese.rb b/vendor/plugins/rfpdf/lib/rfpdf/japanese.rb index f876148..3f83429 100644 --- a/vendor/plugins/rfpdf/lib/rfpdf/japanese.rb +++ b/vendor/plugins/rfpdf/lib/rfpdf/japanese.rb @@ -103,7 +103,7 @@ module PDF_Japanese 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 @@ -179,7 +179,7 @@ module PDF_Japanese end if(o<128) #ASCII - l+=cw[c.chr] + l+=cw[c.chr] || 0 n=1 if(o==32) sep=i @@ -270,7 +270,7 @@ module PDF_Japanese end if(o<128) #ASCII - l+=cw[c.chr] + l+=cw[c.chr] || 0 n=1 if(o==32) sep=i