@@ -34,13 +34,40 module Redmine | |||
|
34 | 34 | attr_accessor :footer_date |
|
35 | 35 | |
|
36 | 36 | def initialize(lang) |
|
37 | super() | |
|
38 | 37 | if RUBY_VERSION < '1.9' |
|
39 | 38 | @ic = Iconv.new(l(:general_pdf_encoding), 'UTF-8') |
|
40 | 39 | end |
|
40 | pdf_encoding = l(:general_pdf_encoding).upcase | |
|
41 | super('P', 'mm', 'A4', (pdf_encoding == 'UTF-8'), pdf_encoding ) | |
|
41 | 42 | set_language_if_valid lang |
|
42 | @font_for_content = 'FreeSans' | |
|
43 | @font_for_footer = 'FreeSans' | |
|
43 | case pdf_encoding | |
|
44 | when 'UTF-8' | |
|
45 | @font_for_content = 'FreeSans' | |
|
46 | @font_for_footer = 'FreeSans' | |
|
47 | when 'CP949' | |
|
48 | extend(PDF_Korean) | |
|
49 | AddUHCFont() | |
|
50 | @font_for_content = 'UHC' | |
|
51 | @font_for_footer = 'UHC' | |
|
52 | when 'CP932' | |
|
53 | extend(PDF_Japanese) | |
|
54 | AddSJISFont() | |
|
55 | @font_for_content = 'SJIS' | |
|
56 | @font_for_footer = 'SJIS' | |
|
57 | when 'GB18030' | |
|
58 | extend(PDF_Chinese) | |
|
59 | AddGBFont() | |
|
60 | @font_for_content = 'GB' | |
|
61 | @font_for_footer = 'GB' | |
|
62 | when 'BIG5' | |
|
63 | extend(PDF_Chinese) | |
|
64 | AddBig5Font() | |
|
65 | @font_for_content = 'Big5' | |
|
66 | @font_for_footer = 'Big5' | |
|
67 | else | |
|
68 | @font_for_content = 'Arial' | |
|
69 | @font_for_footer = 'Helvetica' | |
|
70 | end | |
|
44 | 71 | SetCreator(Redmine::Info.app_name) |
|
45 | 72 | SetFont(@font_for_content) |
|
46 | 73 | end |
General Comments 0
You need to be logged in to leave comments.
Login now