Open GoogleCodeExporter opened 8 years ago
看到这个BUG,我Google了一下,找到了这个日本人提供的解决��
�案
http://services.mozilla.gr.jp/viewsvn/bugzilla-l10n-ja-3.2/branches/bugjp/templa
te/en/default/reports/?sortby=rev
稍后测试一下是否可行
Original comment by CNBorn
on 23 Dec 2008 at 9:16
我是了一下好像不行
Original comment by hw...@163.com
on 23 Dec 2008 at 11:16
[Sorry I can hardly read Chinese and unable to write]
Yes himorin's solution is good and working. You don't have to go this far, just
statically put
graph.set_xxx_font('/path/to/font.ttf'), 9)
within templates.
See also https://bugzilla.mozilla.org/show_bug.cgi?id=287682
Original comment by vitaly.f...@gmail.com
on 26 Dec 2008 at 8:20
I have tried serveal methods to make the graph component to display chinese. But
failed. I have tried to add the line above in comment 3 in report_template,
nothing
happened. Tried with both absolute path and relative path under Windows
environment,
both wqy-zh & simSun font.
Do we have anybody who have also checked this issue?
Suspiction: There may also some character codec issues are related in this bug.
I
thought the characters outputed are displayed in a way that UTF-8 characters
are not
correctly displayed.
Original comment by CNBorn
on 12 Jan 2009 at 5:49
First, make sure your fonts are UTF-8 ones, not any other encoding
What do you see instead of correct glyphs? Could you provide a screenshot?
What do you see in Apache error log?
Could you attach your modified template?
Original comment by vitaly.f...@gmail.com
on 14 Jan 2009 at 11:05
1) From Bugzilla 3.2, I believe the strings are encoded in UTF-8 codec. If I am
not
correct please feel free to point it out.
2) Here is a screenshot of the glyphs. (Bar Report) I keep the bottom chinese
charaters which are displayed correctly, therefore you can see the difference
between
them and the glyphs in report graphs.
3) I have modified bar-report.png.tmpl, I added serveral lines as following:
graph.set_x_label_font('c:/Bugzilla/wqy-zenhei.ttf', 12);
graph.set_x_axis_font('c:/Bugzilla/wqy-zenhei.ttf', 12);
graph.set_y_label_font('c:/Bugzilla/wqy-zenhei.ttf', 12);
graph.set_y_axis_font('c:/Bugzilla/wqy-zenhei.ttf', 12);
graph.set_title_font('c:/Bugzilla/wqy-zenhei.ttf', 12);
graph.set_legend_font('c:/Bugzilla/wqy-zenhei.ttf', 12);
graph.set_value_font('c:/Bugzilla/wqy-zenhei.ttf', 12);
see the complete modified file please refer to the attachements
4) I checked apache error log this time, and I found no error message when
Bugzilla
was generating the bar-report. But I found some error messages were generated in
previous times when I do the report. It refers to a file which I hvaen't
touched. I
am not so sure that these error messages are directly related to the template
file
which I attached here, but I posted some of these error messages here for you
as an
reference.
At the end, thanks for your support of this project :)
Original comment by CNBorn
on 15 Jan 2009 at 9:42
Attachments:
By the way, you can download the font at http://wenq.org, wqy-zenhei is an
opensource
chinese font.
Original comment by CNBorn
on 15 Jan 2009 at 10:03
hi, thank you for using / testing my patch.
could you try the followings?
1. Does the output 'garbaged gryphs' change with deleting the new lines?
2. Could you rename font file name as excluding '-'?
Original comment by shim...@gmail.com
on 16 Jan 2009 at 4:34
hi shimono,
1. No, it doesn't change when I deleted these lines.
2. I have tried renameing the font file but It doesn't work either.
Original comment by CNBorn
on 19 Jan 2009 at 8:40
And when I was doing all the approaches in Comment #9, there are no error
messages
that are generated by Apache.
Original comment by CNBorn
on 19 Jan 2009 at 8:42
May I advice a smoke test:
1. Create test entity in English (product, platform, user -- any would do)
2. Copy any Windows TTF font to c:/Bugzilla/ and tune templates to it -- or just
rename a font to wqy-zenhei.ttf
3. Remove by hand en/default templates of same name, just to make sure Bugzilla
has
no chance to avoid your customized template with peculiar search paths
4. run checksetup.pl, restart httpd and try to plot
If this won't work either, we should have look at GD and/or file permissions.
If it works -- our attention will be turned to wqy-zenhei font specifics, UTF-8
debugging, or template search paths...
Original comment by vitaly.f...@gmail.com
on 19 Jan 2009 at 11:50
I have done the smoke test and found that it won't work either, the output of
chinese
characters are still messy.
maybe we should look into GD to find how it outputs Chinese characters in UTF-8.
Original comment by CNBorn
on 16 Feb 2009 at 5:50
Look at https://bugzilla.mozilla.org/show_bug.cgi?id=427961
Original comment by vitaly.f...@gmail.com
on 12 Apr 2009 at 3:52
Original issue reported on code.google.com by
hw...@163.com
on 23 Dec 2008 at 8:29