SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001096SiT!reportspublic2010-02-21 02:022010-03-27 12:31
Reporterallen_zhao 
Assigned Topaulh 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.51 
Target Version3.60 LTSFixed in Version3.60 LTS 
Summary0001096: report_incidents_by_skills shows ??? for title on pie lang is zh_CN
DescriptionHi Team,

When the user lang profile is zh_CN, the report_incidents_by_skills show ???? on title in the pie chart.
I print the chart.php, and it as following:
"src='chart.php?type=pie&data=34|11|8|3|1|0&legends=McAfee Email Gateway Support (59.6%)|PC Support (19.3%)|McAfee Firewall Support (14.0%)|McAfee Web Gateway Support (5.3%)|ePO support (1.8%)|Others (0.0)&title=%E6%8C%89%E6%8A%80%E8%83%BD' "

and the you can see the attached pic for screenshot.

Thanks

Allen Zhao
TagsNo tags attached.
Attached Filespng file icon sit_report.png [^] (45,845 bytes) 2010-02-21 02:02


png file icon noluck.png [^] (8,132 bytes) 2010-02-23 01:36

- Relationships
has duplicate 0001116closed Bad symbols in Incident details -> Service 
has duplicate 0000909closedpaulh Bad symbols in picture 

-  Notes
(0002430)
allen_zhao (reporter)
2010-02-21 02:05

I have checked the latest svn, and it seemed the code for pie chart does not change:

if (extension_loaded('gd'))
        {
            $data = substr($data, 0, strlen($data)-1);
            $legend = substr($legend, 0, strlen($legend)-1);
            $title = urlencode($strIncidentsBySkill);
            echo "\n

<div style='text-align:center;'>";
            echo "\n<img src='chart.php?type=pie&data={$data}&legends={$legend}&
title={$title}' />";
            echo "\n</div>

";

Thanks

Allen
User avatar (0002431)
paulh (administrator)
2010-02-21 11:21

Hi,

The problem with the large pie slice is already fixed in SVN (its in chart.php, we no longer attempt to draw a slice of zero degrees.

As for the title I can confirm this is still an issue with the latest code
User avatar (0002432)
paulh (administrator)
2010-02-21 13:12

GDs internal font only supports ISO 8859-2 (http://bugs.php.net/bug.php?id=31079&edit=1 [^]) so we'd need to ship/support an external font to resolve this one
(0002448)
allen_zhao (reporter)
2010-02-22 01:21

Paul,

I can send you the font file with Chinese, but it is about 7M, how could I upload it to you?

Thanks

Allen Zhao
User avatar (0002450)
paulh (administrator)
2010-02-22 15:08

Hi Allen Zhao,

If you have a TTF font you can copy this to your sit install directory and rename it FreeSans.ttf then you should get a title on the chart.

We're going to look at a better solution for a subsequent release.

Cheers
Paul
(0002453)
allen_zhao (reporter)
2010-02-23 01:37

Hi Paul,

I have tried with the new ttf font, but no lucky, and I have uploaded the new pic to this ticket.

Thanks

Allen
User avatar (0002454)
paulh (administrator)
2010-02-23 08:42

Hi Allen,

Appologies the font needs to go in <sit>/lib/ as FreeSans.ttf

Thanks
Paul
(0002455)
allen_zhao (reporter)
2010-02-23 12:24

Hi Paul,

the FreeSans.ttf was in <sit>/lib, and you may found the English letter's font in second pic is diffirent to the first pic that I uploaded.

Any information you need, please let me know.

Thanks

Allen Zhao
User avatar (0002456)
paulh (administrator)
2010-02-23 12:30

Ahh Ok, is this a font which has Chinese characters? If so could you email me a copy to paul [at] sitracker.org
User avatar (0002457)
paulh (administrator)
2010-02-23 19:35

Hi Allen,

Thanks for the font the reason this font doesn't work is its not UTF which GD (the backend image library requires). I've tried using ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/Cyberbit.ZIP [^] which are UTF and these give Chinese symbols in the graph (sorry unable to confirm if its correct as I don't read Chinese). Unfortunately it would seem that this font isn't GPL (http://en.wikipedia.org/wiki/Bitstream_Cyberbit [^]) so we're not able to use it and depending on your organisation you may not be able to use it.

If anyone knows of a good GPL UTF font that would be great.

Cheers
Paul
User avatar (0002529)
ivan (administrator)
2010-02-27 22:42

Tomse pointed me to http://www.unifont.org/fontguide/ [^] which looks very useful.
User avatar (0002536)
paulh (administrator)
2010-02-28 17:48

Thanks that link looks useful, my plan to resolve this is

a) Convert the hardcoded font to a config variable
b) Create fonts plugin which ships a number of GPL (or compatible) fonts and overrides the config variable on login

This way we get around the problem of shipping a large number of fonts in our base install though having them available via a plugin, hopefully I am to ship with fonts for each of the languages we have translations for
User avatar (0002540)
ivan (administrator)
2010-02-28 17:54

Great! Thanks Paul, that sounds ideal all round.
User avatar (0002544)
paulh (administrator)
2010-02-28 20:28

6f26753 in my fonts git branch and r6182 are the start of adding this support.

The Chinese font is 17M we could perhaps do with a smaller one if such a thing exists

Still looking for an opensource Japanese font if anyone can help
User avatar (0002545)
ivan (administrator)
2010-02-28 20:58

Sazanami Gothic http://sourceforge.jp/cvs/view/sqs-xml/sqs-font/ [^]

See also http://openfontlibrary.org/ [^]

and this helpful page at freedesktop.org listing which fonts to use for which language http://www.freedesktop.org/wiki/Software/Fonts [^]
User avatar (0002566)
ivan (administrator)
2010-03-01 15:01

See also http://is.gd/9sf4E [^]
ttf-vlgothic - Japanese TrueType font from Vine Linux
User avatar (0002591)
paulh (administrator)
2010-03-04 19:31

As of r6190 (3.x) and r6190 (font branch) this is in SVN and as of e72b5681 and 6f26753e its in git

just need to fully test and ensure the merge was successful
User avatar (0002716)
paulh (administrator)
2010-03-16 20:39

Hi,

This is fixed in 3.6 with the fonts plugin (http://sitracker.org/wiki/Fonts_plugin [^]) we intend to ship 3.6 at the end of March

Cheers
Paul

- Issue History
Date Modified Username Field Change
2010-02-21 02:02 allen_zhao New Issue
2010-02-21 02:02 allen_zhao File Added: sit_report.png
2010-02-21 02:05 allen_zhao Note Added: 0002430
2010-02-21 11:21 paulh Note Added: 0002431
2010-02-21 11:22 paulh Status new => confirmed
2010-02-21 11:22 paulh Summary report_incidients_by_skills show massive in pie chart if lang is zh_CN => report_incidients_by_skills shows ??? for title on pie lang is zh_CN
2010-02-21 13:12 paulh Note Added: 0002432
2010-02-22 01:21 allen_zhao Note Added: 0002448
2010-02-22 15:08 paulh Note Added: 0002450
2010-02-23 01:36 allen_zhao File Added: noluck.png
2010-02-23 01:37 allen_zhao Note Added: 0002453
2010-02-23 08:42 paulh Note Added: 0002454
2010-02-23 12:24 allen_zhao Note Added: 0002455
2010-02-23 12:30 paulh Note Added: 0002456
2010-02-23 19:35 paulh Note Added: 0002457
2010-02-27 22:42 ivan Note Added: 0002529
2010-02-28 17:45 paulh Status confirmed => assigned
2010-02-28 17:45 paulh Assigned To => paulh
2010-02-28 17:48 paulh Note Added: 0002536
2010-02-28 17:54 ivan Note Added: 0002540
2010-02-28 20:28 paulh Note Added: 0002544
2010-02-28 20:58 ivan Note Added: 0002545
2010-03-01 15:01 ivan Note Added: 0002566
2010-03-01 17:51 ivan Summary report_incidients_by_skills shows ??? for title on pie lang is zh_CN => report_incidents_by_skills shows ??? for title on pie lang is zh_CN
2010-03-04 19:31 paulh Note Added: 0002591
2010-03-04 19:33 paulh Relationship added has duplicate 0001116
2010-03-14 19:18 ivan Relationship added has duplicate 0000909
2010-03-16 20:39 paulh Note Added: 0002716
2010-03-16 20:39 paulh Status assigned => resolved
2010-03-16 20:39 paulh Resolution open => fixed
2010-03-16 20:39 paulh Fixed in Version => 3.60 LTS
2010-03-27 11:13 ivan Target Version => 3.60 LTS
2010-03-27 12:31 ivan Status resolved => closed


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker