Korean support for PDF export (#4639).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3389 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f5dfe8b2f5
commit
446ef61680
@ -35,6 +35,11 @@ module Redmine
|
|||||||
super()
|
super()
|
||||||
set_language_if_valid lang
|
set_language_if_valid lang
|
||||||
case current_language.to_s.downcase
|
case current_language.to_s.downcase
|
||||||
|
when 'ko'
|
||||||
|
extend(PDF_Korean)
|
||||||
|
AddUHCFont()
|
||||||
|
@font_for_content = 'UHC'
|
||||||
|
@font_for_footer = 'UHC'
|
||||||
when 'ja'
|
when 'ja'
|
||||||
extend(PDF_Japanese)
|
extend(PDF_Japanese)
|
||||||
AddSJISFont()
|
AddSJISFont()
|
||||||
|
10
vendor/plugins/rfpdf/lib/rfpdf/korean.rb
vendored
10
vendor/plugins/rfpdf/lib/rfpdf/korean.rb
vendored
@ -139,13 +139,13 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9
|
|||||||
b2='LR'
|
b2='LR'
|
||||||
else
|
else
|
||||||
b2=''
|
b2=''
|
||||||
if(border.index('L').nil?)
|
if(border.to_s.index('L').nil?)
|
||||||
b2+='L'
|
b2+='L'
|
||||||
end
|
end
|
||||||
if(border.index('R').nil?)
|
if(border.to_s.index('R').nil?)
|
||||||
b2+='R'
|
b2+='R'
|
||||||
end
|
end
|
||||||
b=border.index('T').nil? ? b2+'T' : b2
|
b=border.to_s.index('T').nil? ? b2+'T' : b2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
sep=-1
|
sep=-1
|
||||||
@ -178,7 +178,7 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9
|
|||||||
sep=i
|
sep=i
|
||||||
ls=l
|
ls=l
|
||||||
end
|
end
|
||||||
l+=ascii ? cw[c.chr] : 1000
|
l+=(ascii ? cw[c.chr] : 1000) || 0
|
||||||
if(l>wmax)
|
if(l>wmax)
|
||||||
#Automatic line break
|
#Automatic line break
|
||||||
if(sep==-1 or i==j)
|
if(sep==-1 or i==j)
|
||||||
@ -202,7 +202,7 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
#Last chunk
|
#Last chunk
|
||||||
if(border and not border.index('B').nil?)
|
if(border and not border.to_s.index('B').nil?)
|
||||||
b+='B'
|
b+='B'
|
||||||
end
|
end
|
||||||
Cell(w,h,s[j,i-j],b,2,align,fill)
|
Cell(w,h,s[j,i-j],b,2,align,fill)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user