##// END OF EJS Templates
PDF: use DejaVuSans fonts in Vietnamese (#8566)....
Toshi MARUYAMA -
r5915:a6f1ae1f964e
parent child
Show More
@@ -40,33 +40,39 module Redmine
40 @ic = Iconv.new(pdf_encoding, 'UTF-8')
40 @ic = Iconv.new(pdf_encoding, 'UTF-8')
41 end
41 end
42 super('P', 'mm', 'A4', (pdf_encoding == 'UTF-8'), pdf_encoding)
42 super('P', 'mm', 'A4', (pdf_encoding == 'UTF-8'), pdf_encoding)
43 case pdf_encoding
43 case current_language.to_s.downcase
44 when 'UTF-8'
44 when 'vi'
45 @font_for_content = 'FreeSans'
45 @font_for_content = 'DejaVuSans'
46 @font_for_footer = 'FreeSans'
46 @font_for_footer = 'DejaVuSans'
47 when 'CP949'
48 extend(PDF_Korean)
49 AddUHCFont()
50 @font_for_content = 'UHC'
51 @font_for_footer = 'UHC'
52 when 'CP932', 'SJIS', 'SHIFT_JIS'
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
47 else
68 @font_for_content = 'Arial'
48 case pdf_encoding
69 @font_for_footer = 'Helvetica'
49 when 'UTF-8'
50 @font_for_content = 'FreeSans'
51 @font_for_footer = 'FreeSans'
52 when 'CP949'
53 extend(PDF_Korean)
54 AddUHCFont()
55 @font_for_content = 'UHC'
56 @font_for_footer = 'UHC'
57 when 'CP932', 'SJIS', 'SHIFT_JIS'
58 extend(PDF_Japanese)
59 AddSJISFont()
60 @font_for_content = 'SJIS'
61 @font_for_footer = 'SJIS'
62 when 'GB18030'
63 extend(PDF_Chinese)
64 AddGBFont()
65 @font_for_content = 'GB'
66 @font_for_footer = 'GB'
67 when 'BIG5'
68 extend(PDF_Chinese)
69 AddBig5Font()
70 @font_for_content = 'Big5'
71 @font_for_footer = 'Big5'
72 else
73 @font_for_content = 'Arial'
74 @font_for_footer = 'Helvetica'
75 end
70 end
76 end
71 SetCreator(Redmine::Info.app_name)
77 SetCreator(Redmine::Info.app_name)
72 SetFont(@font_for_content)
78 SetFont(@font_for_content)
General Comments 0
You need to be logged in to leave comments. Login now