]> source.dussan.org Git - redmine.git/commitdiff
pdf: remove styles by fontname instated of Arabic/Persian/Thai locale (#10681, #18586)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 8 Feb 2015 04:04:35 +0000 (04:04 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 8 Feb 2015 04:04:35 +0000 (04:04 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13977 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/export/pdf.rb

index dd1616f9cc44051a7a40ee40ce3a2f6ca038cbc3..dd7c91d4b567e594fecc601fe66177f91c83bd9b 100644 (file)
@@ -49,8 +49,10 @@ module Redmine
         end
 
         def SetFont(family, style='', size=0, fontfile='')
-          style.delete!('B') if current_language.to_s.downcase == 'th' # FreeSerif Bold Thai font has problem.
-          style.delete!('I') if current_language.to_s.downcase =~ /^(fa|ar)$/ # DejaVuSans Italic Arabic and Persian font has problem.
+          # FreeSerif Bold Thai font has problem.
+          style.delete!('B') if l(:general_pdf_fontname) == 'freeserif'
+          # DejaVuSans Italic Arabic and Persian font has problem.
+          style.delete!('I') if l(:general_pdf_fontname) == 'DejaVuSans'
           super(family, style, size, fontfile)
         end
         alias_method :set_font, :SetFont