ganttproject icon indicating copy to clipboard operation
ganttproject copied to clipboard

Chinese glyphs do not show on the chart images in PDF export

Open qiweihu opened this issue 9 years ago • 10 comments

I have the latest version of GanttProject. As you can see in picture 1, I created a simple project flow in Chinese, and everything seems to work fine. However, wheni tried to export the file to PDF (even choosing a Chinese font), the PDF does not display the text correctly.

g1

g2

qiweihu avatar Sep 15 '17 01:09 qiweihu

Did you choose Chinese font as a replacement for Arial in the PDF export settings (see screenshot)?

image

dbarashev avatar Sep 15 '17 02:09 dbarashev

Yes. " (even choosing a Chinese font)". I chose the replacement font, then page 2 "task report(page 1 and 2)" display correctly, but not the gantt chart(page 3 and 4). g3

qiweihu avatar Sep 15 '17 02:09 qiweihu

I also met this issue for a long time. My colleagues and I run ganttproject on Windows and Mac (A Chinese ver. of MacOS and an English one).

That the ganttproject runs on Windows or Chinese macOS works well as @qiweihu said. image image

On the English macOS, pages of tasks and gantt cannot display the Chinese in PDF. Another issue on English macOS is that I cannot choose Chinese Font in the substitution list, so I cannot test further.

kenmjlee avatar Nov 29 '17 09:11 kenmjlee

I just used GanttProject 2.8.9 to check this bug. This bug still exists in version 2.8.9. My test environment: OS: Windows 10 Software: GanttProject 2.8.9 Export to PDF and used replaced font which can show chinese Problem: Chinese glyphs do not show on the chart images in PDF export

zhuang2k2 avatar Aug 28 '18 17:08 zhuang2k2

Can you please show the screenshots of your GanttProject window, Application UI page of the settings dialog and the settings page of PDF Export tool? And the result of exporting (PDF file)? Thanks!

dbarashev avatar Aug 28 '18 22:08 dbarashev

  1. Application UI ui

  2. settings page of PDF Export tool pdf_1 pdf_2

  3. Export to PDF result document.pdf

  4. Export to HTML export_html

  5. Export to image can show Chinese correctly as HTML.

  6. Gantt Project for this test Chinese_Test.zip Inside the zip file is the Chinese_test.gan which is saved by GanttProject 2.8.9.

Thanks for your help.

zhuang2k2 avatar Aug 29 '18 16:08 zhuang2k2

Can you please set Application font (and maybe Base Chart font as well) in the Application UI settings to font with Chinese glyphs (e.g. WengQuanYi Micro Hei) ?

dbarashev avatar Aug 29 '18 23:08 dbarashev

I set Application font & Base Chart font as Chinese font. The result is the same. ui

zhuang2k2 avatar Aug 30 '18 02:08 zhuang2k2

Test Report. I download set application font "WengQuanYi Micro Hei" from internet to test. This time I can successfully export PDF with Chinese

Below two settings are must.

  1. Application font = WengQuanYi Micro Hei ui

  2. PDF export font = WengQuanYi Micro Hei pdf_2

Base Chart font can select other fonts. Selecting other Chinese fonts cannot export the correct result.

zhuang2k2 avatar Aug 30 '18 02:08 zhuang2k2

The story with fonts is more complex. It is not that "PDF export font = WengQuanYi Micro Hei, [all] other Chinese fonts cannot export the correct result".

First, in PDF export we can only use TrueType/OpenType fonts which are accessible as font files in one of the predefined folders (for Windows, it is C:/windows/fonts) . Second, font needs to embeddable, and not all fonts are. However, there are definitely fonts which can be used in PDF export other than WengQuanYi Micro Hei.

dbarashev avatar Aug 30 '18 22:08 dbarashev