PDF: code clean up lib/redmine/export/pdf.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5384 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ce6377b406
commit
85b891ec9e
|
@ -84,7 +84,7 @@ module Redmine
|
||||||
class IFPDF < FPDF
|
class IFPDF < FPDF
|
||||||
include Redmine::I18n
|
include Redmine::I18n
|
||||||
attr_accessor :footer_date
|
attr_accessor :footer_date
|
||||||
|
|
||||||
def initialize(lang)
|
def initialize(lang)
|
||||||
super()
|
super()
|
||||||
set_language_if_valid lang
|
set_language_if_valid lang
|
||||||
|
@ -98,17 +98,17 @@ module Redmine
|
||||||
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 'GB18030'
|
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 'BIG5'
|
when 'BIG5'
|
||||||
extend(PDF_Chinese)
|
extend(PDF_Chinese)
|
||||||
AddBig5Font()
|
AddBig5Font()
|
||||||
@font_for_content = 'Big5'
|
@font_for_content = 'Big5'
|
||||||
@font_for_footer = 'Big5'
|
@font_for_footer = 'Big5'
|
||||||
else
|
else
|
||||||
@font_for_content = 'Arial'
|
@font_for_content = 'Arial'
|
||||||
@font_for_footer = 'Helvetica'
|
@font_for_footer = 'Helvetica'
|
||||||
|
@ -116,11 +116,11 @@ module Redmine
|
||||||
SetCreator(Redmine::Info.app_name)
|
SetCreator(Redmine::Info.app_name)
|
||||||
SetFont(@font_for_content)
|
SetFont(@font_for_content)
|
||||||
end
|
end
|
||||||
|
|
||||||
def SetFontStyle(style, size)
|
def SetFontStyle(style, size)
|
||||||
SetFont(@font_for_content, style, size)
|
SetFont(@font_for_content, style, size)
|
||||||
end
|
end
|
||||||
|
|
||||||
def SetTitle(txt)
|
def SetTitle(txt)
|
||||||
txt = begin
|
txt = begin
|
||||||
utf16txt = Iconv.conv('UTF-16BE', 'UTF-8', txt)
|
utf16txt = Iconv.conv('UTF-16BE', 'UTF-8', txt)
|
||||||
|
|
Loading…
Reference in New Issue