Charater support

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
nams

Charater support

Post by nams » Wed May 08, 2002 3:59 pm

Hello.

There are many updates for chart against ver 0.7.1. I used well JFreeChart 0.7.1. But there were some problems for generating specific charaterset;Korean. Since Korean characters were broken, I had to change source; maybe.. drawString().

I have question whether JfreeChart 0.8.0 has same technics about this or not.

regards for answer.

David Gilbert

Re: Charater support

Post by David Gilbert » Thu May 09, 2002 4:35 pm

I haven't changed anything specifically as I'm not sure why JFreeChart would be failing for international characters...if anyone has any info it would be good to sort this out.

Regards,

DG.

David Gilbert

Re: Character support

Post by David Gilbert » Fri May 10, 2002 4:09 pm

Here's a link I found today regarding TrueType fonts and Unicode:

http://www.ccss.de/slovo/unifonts.htm

The comment at the top of the page is interesting, regarding the "most complete TrueType" font being Arial Unicode MS. I now have this installed on my system (the font file is VERY large).

Using this font I can get JFreeChart to display all kinds of characters using Unicode escape sequences. For example, here is a title using currency symbols:

String text = "TEST: \u278A\u20A0\u20A1\u20A2\u20A3\u20A4\u20A5\u20A6\u20A7\u20A8\u20A9";
TextTitle subtitle = new TextTitle(text, new Font("Arial Unicode MS", Font.PLAIN, 12));
chart.addTitle(subtitle);

I also got this to work with some Japanese characters. Maybe the problem you are having is that the font you are using doesn't have the Korean characters you want...

Regards,

DG.

Locked