Project

General

Profile

Defect #10681 » pdf.rb_r13857.patch

Jun NAITOH, 2015-01-10 07:19

View differences:

lib/redmine/export/pdf.rb (working copy)
37 37
          super(orientation, 'mm', 'A4')
38 38
          set_print_header(false)
39 39
          set_rtl(l(:direction) == 'rtl')
40
          set_temp_rtl(l(:direction) == 'rtl' ? 'R' : 'L')
41 40

  
42 41
          @font_for_content = l(:general_pdf_fontname)
43 42
          @font_for_footer  = l(:general_pdf_fontname)
......
50 49
        end
51 50

  
52 51
        def SetFontStyle(style, size)
53
          style.delete!('B') if current_language.to_s.downcase == 'th' # FreeSerif Bold Thai font has problem.
54 52
          set_font(@font_for_content, style, size)
55 53
        end
56 54

  
55
        def SetFont(family, style='', size=0, fontfile='')
56
          style.delete!('B') if current_language.to_s.downcase == 'th' # FreeSerif Bold Thai font has problem.
57
          style.delete!('I') if current_language.to_s.downcase =~ /^(fa|ar)$/ # DejaVuSans Italic Arabic and Persian font has problem.
58
          super(family, style, size, fontfile)
59
        end
60
        alias_method :set_font, :SetFont
61

  
57 62
        def fix_text_encoding(txt)
58 63
          RDMPdfEncoding::rdm_from_utf8(txt, "UTF-8")
59 64
        end
(11-11/11)