Enable Chinese,Japanese,Korean Font when exporting Redmine Gantt PNG

  1. Install ImageMagick

    1
    yum install ImageMagick ImageMagick-devel
  2. Gem install rmagick
    Gemfile:

    1
    gem 'rmagick', '~> 2.15', '>= 2.15.4'

    Run:

    1
    bundle install
  3. Find out which fonts support CJK Language you expected:

    1
    fc-list :lang=zh
  4. Add the font path to config/configuration.yml

    1
    minimagick_font_path: /usr/share/fonts/wqy-microhei/wqy-microhei.ttc
  5. Restart your redmine, It’s done!

  6. BONUS
    user-profile set to English, export pdf in CJK
    modify config/locales/en.yml

    1
    2
    3
    4
    #general_csv_encoding: ISO-8859-1
    general_csv_encoding: UTF-8
    #general_pdf_fontname: freesans
    general_pdf_fontname: stsongstdlight