PDF: Ruby 1.9 compatibility for FPDF ANSI (#61).

Contributed by Jun NAITOH.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5331 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-04-05 14:13:03 +00:00
parent c41a3ace07
commit 47dccc53b3
3 changed files with 9 additions and 9 deletions

View File

@ -130,7 +130,7 @@ module PDF_Chinese
nb=s.length
i=0
while(i<nb)
c=s[i]
c = s[i].is_a?(String) ? s[i].ord : s[i]
if(c<128)
l+=cw[c.chr] if cw[c.chr]
i+=1
@ -182,7 +182,7 @@ module PDF_Chinese
nl=1
while(i<nb)
#Get next character
c=s[i]
c = s[i].is_a?(String) ? s[i].ord : s[i]
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")
@ -258,7 +258,7 @@ module PDF_Chinese
nl=1
while(i<nb)
#Get next character
c=s[i]
c = s[i].is_a?(String) ? s[i].ord : s[i]
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")

View File

@ -100,7 +100,7 @@ module PDF_Japanese
nb=s.length
i=0
while(i<nb)
o=s[i]
o = s[i].is_a?(String) ? s[i].ord : s[i]
if(o<128)
#ASCII
l+=cw[o.chr] if cw[o.chr]
@ -158,7 +158,7 @@ module PDF_Japanese
nl=1
while(i<nb)
#Get next character
c=s[i]
c = s[i].is_a?(String) ? s[i].ord : s[i]
o=c #o=ord(c)
if(o==10)
#Explicit line break
@ -246,7 +246,7 @@ module PDF_Japanese
nl=1
while(i<nb)
#Get next character
c=s[i]
c = s[i].is_a?(String) ? s[i].ord : s[i]
o=c
if(o==10)
#Explicit line break

View File

@ -99,7 +99,7 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9
nb=s.length
i=0
while(i<nb)
c=s[i]
c = s[i].is_a?(String) ? s[i].ord : s[i]
if(c<128)
l+=cw[c.chr] if cw[c.chr]
i+=1
@ -151,7 +151,7 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9
nl=1
while(i<nb)
#Get next character
c=s[i]
c = s[i].is_a?(String) ? s[i].ord : s[i]
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")
@ -227,7 +227,7 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9
nl=1
while(i<nb)
#Get next character
c=s[i]
c = s[i].is_a?(String) ? s[i].ord : s[i]
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")