Project

General

Profile

Actions

Patch #3231

closed

patch for broken character problem on png-exported gantt on 0.8 branch

Added by Yonghwan SO almost 15 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
Gantt
Target version:
-
Start date:
2009-04-23
Due date:
% Done:

0%

Estimated time:

Description

  • for 0.8.3 on linux
  • related to non-ascii characters (especially hangul)

If I export gantt chart as png, all korean characters(hangul) are broken.
because there is no matching font (for rmagick).

I made simple patch to fix it, and it simply uses a font file (on extra/custom.ttf).

This method is not a kind of i18n, but IMHO, we can improve it or write something like it.


Files

redmine-0.8.3-png-font.patch (542 Bytes) redmine-0.8.3-png-font.patch Yonghwan SO, 2009-04-23 19:32

Related issues

Related to Redmine - Defect #4787: Gannt to PNG - CJK (Chinese, Japanese and Korean) characters appear as ?ClosedToshi MARUYAMA2010-02-10

Actions
Actions #1

Updated by Jean-Philippe Lang almost 15 years ago

And what happens when 'extra/custom.ttf' does not exist?

Actions #2

Updated by Yonghwan SO almost 15 years ago

Jean-Philippe Lang wrote:

And what happens when 'extra/custom.ttf' does not exist?

Sorry, I feel that my patch and this ticket is very "quick and dirty" style.

In my test, when the font is not exist, nothing is happen. (I guess it just ignored by rMagick. I don't know much about rMagick, so who can help us to verify it?)

PS) background of this patch is :

1) In my case, some(or most) tickets were written with Korean characters, so this is very critical issue since I use png export feature (I think it is very useful one.). not only for me, maybe for all unicode character users.

2) Can it be user configurable or not? I think a minute or more, I think this font configuration is not related to user setting, or default of system. it is depend on individual project's official language. (If the project is global :-)

3) finally, I need more consideration, but I made and use this quick and dirty one now. (and I just release it as is, for more discussions about this issue.)

Thank you for your response.

Actions #3

Updated by Yonghwan SO almost 15 years ago

I checked,

1) ImageMagick's Draw just ignores non-existing font file and fall back to default.
2) but more clearly, I modified the patch.

TODO: test with multi language environment and multiple fonts support if it can.

Actions #4

Updated by Mischa The Evil over 13 years ago

  • Category changed from Issues to Gantt
Actions #5

Updated by Jean-Baptiste Barth almost 13 years ago

  • Status changed from New to Closed

Imho this is a server problem : if your users are korean, let's install korean fonts on the server, Rmagick should find them. Anyway I close the issue since it's 2 years old and nobody was really interested, no offense...

Actions

Also available in: Atom PDF