diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-02-07 12:30:44 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-02-07 12:30:44 +0000 |
commit | 446ef61680132e33315b4dfc396bec607143b0b3 (patch) | |
tree | dd7049d217bd2464b928c84fd22369b2f9618fed | |
parent | f5dfe8b2f51bb38043dd6107acd164fcce953ca4 (diff) | |
download | redmine-446ef61680132e33315b4dfc396bec607143b0b3.tar.gz redmine-446ef61680132e33315b4dfc396bec607143b0b3.zip |
Korean support for PDF export (#4639).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3389 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | lib/redmine/export/pdf.rb | 5 | ||||
-rw-r--r-- | vendor/plugins/rfpdf/lib/rfpdf/korean.rb | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb index c80880afa..c24921653 100644 --- a/lib/redmine/export/pdf.rb +++ b/lib/redmine/export/pdf.rb @@ -35,6 +35,11 @@ module Redmine super() set_language_if_valid lang case current_language.to_s.downcase + when 'ko' + extend(PDF_Korean) + AddUHCFont() + @font_for_content = 'UHC' + @font_for_footer = 'UHC' when 'ja' extend(PDF_Japanese) AddSJISFont() diff --git a/vendor/plugins/rfpdf/lib/rfpdf/korean.rb b/vendor/plugins/rfpdf/lib/rfpdf/korean.rb index 64131405e..2b1f6de6c 100644 --- a/vendor/plugins/rfpdf/lib/rfpdf/korean.rb +++ b/vendor/plugins/rfpdf/lib/rfpdf/korean.rb @@ -139,13 +139,13 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9 b2='LR'
else
b2=''
- if(border.index('L').nil?)
+ if(border.to_s.index('L').nil?)
b2+='L'
end
- if(border.index('R').nil?)
+ if(border.to_s.index('R').nil?)
b2+='R'
end
- b=border.index('T').nil? ? b2+'T' : b2
+ b=border.to_s.index('T').nil? ? b2+'T' : b2
end
end
sep=-1
@@ -178,7 +178,7 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9 sep=i
ls=l
end
- l+=ascii ? cw[c.chr] : 1000
+ l+=(ascii ? cw[c.chr] : 1000) || 0
if(l>wmax)
#Automatic line break
if(sep==-1 or i==j)
@@ -202,7 +202,7 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9 end
end
#Last chunk
- if(border and not border.index('B').nil?)
+ if(border and not border.to_s.index('B').nil?)
b+='B'
end
Cell(w,h,s[j,i-j],b,2,align,fill)
|