PDF: switch FPDF font with general_pdf_encoding value instead of language value such as 'ja' (#61).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5383 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-04-10 08:34:02 +00:00
parent ed8b82b012
commit ce6377b406
1 changed files with 5 additions and 5 deletions

View File

@ -88,23 +88,23 @@ module Redmine
def initialize(lang) def initialize(lang)
super() super()
set_language_if_valid lang set_language_if_valid lang
case current_language.to_s.downcase case l(:general_pdf_encoding).upcase
when 'ko' when 'CP949'
extend(PDF_Korean) extend(PDF_Korean)
AddUHCFont() AddUHCFont()
@font_for_content = 'UHC' @font_for_content = 'UHC'
@font_for_footer = 'UHC' @font_for_footer = 'UHC'
when 'ja' when 'CP932'
extend(PDF_Japanese) extend(PDF_Japanese)
AddSJISFont() AddSJISFont()
@font_for_content = 'SJIS' @font_for_content = 'SJIS'
@font_for_footer = 'SJIS' @font_for_footer = 'SJIS'
when 'zh' when 'GB18030'
extend(PDF_Chinese) extend(PDF_Chinese)
AddGBFont() AddGBFont()
@font_for_content = 'GB' @font_for_content = 'GB'
@font_for_footer = 'GB' @font_for_footer = 'GB'
when 'zh-tw' when 'BIG5'
extend(PDF_Chinese) extend(PDF_Chinese)
AddBig5Font() AddBig5Font()
@font_for_content = 'Big5' @font_for_content = 'Big5'