]> source.dussan.org Git - redmine.git/commitdiff
FrozenError when exporting gantt to PDF in some languages (#32832).
authorGo MAEDA <maeda@farend.jp>
Sat, 18 Jan 2020 09:58:39 +0000 (09:58 +0000)
committerGo MAEDA <maeda@farend.jp>
Sat, 18 Jan 2020 09:58:39 +0000 (09:58 +0000)
Patch by Pavel Rosický.

git-svn-id: http://svn.redmine.org/redmine/trunk@19435 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/export/pdf.rb
test/functional/issues_controller_test.rb

index c8189367bd8b95c8b23bad531898b0a875f1dd60..85beb8bdb8f0c3ccb58ce3a6340444a13cb26226 100644 (file)
@@ -52,6 +52,7 @@ module Redmine
         end
 
         def SetFont(family, style='', size=0, fontfile='')
+          style = +style
           # FreeSerif Bold Thai font has problem.
           style.delete!('B') if family.to_s.casecmp('freeserif') == 0
           # DejaVuSans Italic Arabic and Persian font has problem.
index 4d0cb4ef14ced020a4be87addb16d6e8f07f3511..cf2a819315eeffa1c754ecd6f8530125355c5fc3 100644 (file)
@@ -1074,7 +1074,7 @@ class IssuesControllerTest < Redmine::ControllerTest
   end
 
   def test_index_pdf
-    ["en", "zh", "zh-TW", "ja", "ko"].each do |lang|
+    ["en", "zh", "zh-TW", "ja", "ko", "ar"].each do |lang|
       with_settings :default_language => lang do
         get :index
         assert_response :success
@@ -2674,7 +2674,7 @@ class IssuesControllerTest < Redmine::ControllerTest
 
   def test_export_to_pdf_with_utf8_u_fffd
     issue = Issue.generate!(:subject => "�")
-    ["en", "zh", "zh-TW", "ja", "ko"].each do |lang|
+    ["en", "zh", "zh-TW", "ja", "ko", "ar"].each do |lang|
       with_settings :default_language => lang do
         get(
           :show,