Dear Michiel,

I did a thorough search in C:\Perl and .\OTRS folder but found nothings with extension .ttf or .fnt. I read http://search.cpan.org/dist/GD/GD.pm carefully and found nothing here providing me how to configure my fonts too.

However as I'm original a C# developer, I searched the web and found GD Sharp, a C# wrapper for GD Library. I used it in a Dot.Net project and set its font to arialuni.ttf. This font has a huge set of Unicode characters including Farsi (Persian). Unfortunately the output image was just some question marks:
        public static void Main()
        {
            GD image = new GD(256 + 384, 384, true);
            GDColor white = image.ColorAllocate(255, 255, 255);
            GDColor blue= image.ColorAllocate(0, 0, 255);
            image.Fill(0, 0, white);
            Font f = new Font(Font.Type.Giant);

            image.String(f, 0, 0, "Test", blue);

            image.StringFT(new ArrayList(), 0, @"c:\WINDOWS\Fonts\arialuni.ttf", 40, 0, 100, 100, "افشار محبی", true);
            image.Arc(128, 128, 60, 20, 0, 720, blue);
            image.Save(GD.FileType.Png, "my.png", 1);
            image.Dispose();

        }
produces image is attached.

Additionaly I found the link http://www.williamsportwebdeveloper.com/heading.ashx?text=ASP.NET%20WebLog that is an ASP.NET consumer of GD Sharp (and GD Library) via this blog post (http://weblogs.asp.net/rrobbins/archive/2008/06/10/dynamic-heading-generator.aspx). This tool produces question marks instead of Persian (Farsi) characters too.

I'm very confused what should I do!

Thanks,
Afshar Mohebbi

On Tue, Apr 7, 2009 at 4:17 PM, Michiel Beijen <michiel@beefreeit.nl> wrote:
Hi Afshar,

Can it be that the font GD uses does not have the Farsi characters in it?
As far as I can see GD does support unicode but if the font in use does not have the characters you want to use it will still be useless.
See http://search.cpan.org/dist/GD/GD.pm for the GD manual. You can load your own TTF fonts with GD or use .fnt font files, I guess you have some fonts which support Farsi installed on your computer you might be able to use for experiments.

Kind regards,
--
Michiel Beijen
Software Consultant
+31 6 - 457 42 418
Bee Free IT + http://beefreeit.nl


On Tue, Apr 7, 2009 at 13:13, Afshar Mohebbi <afshar.mohebbi@gmail.com> wrote:
Hi,
My friend Amir guess that it may be because of database fileds not being defined as Unicode but I think it is because of GD library. Because I've debugged stats.pm (of OTRS framework) and axetype.pm (of Active Perl library) and sent static text to graphic engine instead of database data but the peoblem exists.

Afshar Mohebbi


On Tue, Apr 7, 2009 at 1:54 PM, Afshar Mohebbi <afshar.mohebbi@gmail.com> wrote:
Hi there,

Does anybody have used any graphical  stat report (bar chart, pie chart, ...) with Unicode text like Persian (Farsi), Hebrew or Japaness?

I've tried it many times with Persian (Farsi) bu instead of Persian characters like "سلام", I see european characters with accent above just like "çãã".

How can I correct this?


Regards,
Afshar Mohebbi



---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs


NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/


---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/