ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  I18N issue in python
Posted by Ashish on Feb-23-2011 05:39
I am using Python language chartdirector. I have data in Hindi and Hebrew. It needs to be
displayed in labels in xy charts.

Pychartdirector is not showing the hindi and Hewbrew data, but is showing data from
languages like English, Spanish and Portuguese.

How can I fix that?

  Re: I18N issue in python
Posted by Peter Kwan on Feb-23-2011 12:31
Hi Ashish,

ChartDirector currently supports all unicode characters. However, you still need to have the correct font in your system. For example, if you are using the "Arial" font, it is unlikely you can draw Hindi characters, as the "Arial" font does not have Hindi characters.

Also, if you are using Linux, Solaris or FreeBSD, you would need to install suitable fonts in the ChartDirector fonts subdirectory, and set up your charting script to use them. You may look for "Font Specification" in the ChartDirector documentation index for details.

Finally, whereas ChartDirector can render all unicode characters, it does not perform bidirectional reordering. The characters are simply rendered left to right. If you need to render Hebrew (a right to left language), you would need to reverse the ordering of the characters before passing them to ChartDirector. (You can detect if a character is Hebrew by checking if the character is within the unicode range 0x590 to 0x5ff.)

If the above still does not solve the problem, would you mind to provide me with a hard coded example (with the Hebrew or Hindi text embedded in the source code), and the resulting chart you get? I will try to reproduce the problem.

Hope this can help.

Regards
Peter Kwan

  Re: I18N issue in python
Posted by Ashish on Feb-23-2011 14:40
Thanks, Missing fonts is most likely the issue. I am on linux, where can I get the various
language fonts from?

  Re: I18N issue in python
Posted by Peter Kwan on Feb-23-2011 23:06
Hi Ashish,

If I were you, I would use free Microsoft fonts. (I am not sure if they include Hindi characters though.) See:

http://sourceforge.net/project/showfiles.php?group_id=34153&release_id=105355

http://www.microsoft.com/typography/faq/faq8.htm

There are many other free fonts, such as:

http://www.gnu.org/software/freefont/

Hope this can help.

Regards
Peter Kwan

  Re: I18N issue in python
Posted by Ashish on Feb-24-2011 01:12
Thanks,

I will try MSFT font library. Does chartdirector on linux support open type fonts?
Your documentation does not mention .otf

  Re: I18N issue in python
Posted by Peter Kwan on Feb-24-2011 13:28
Hi Ashish,

Yes. ChartDirector supports open type fonts.

Regards
Peter Kwan