We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Using Japanese characters
Page Index Toggle Pages: 1
Using Japanese characters (Read 677 times)
Using Japanese characters
Jun 9th, 2006, 9:52pm
 
I am trying to use Japanese characters in a sketch of mine. Since I have not been able to convert a full font to Processing's bitmap format (getting lots of out of memory errors in all sorts of places), I had to resort to call

createFont("MS Mincho", fontSize)

to render my characters under Windows. This works well but has two disadvantages:

1. I can't run my code as an applet any more, only as an application

2. The name "MS Mincho" isn't very portable. It seems to work on Mac OS X, but not on Linux.

Any ideas how I can use kanji in Applets?


Harald
Re: Using Japanese characters
Reply #1 - Jun 26th, 2006, 9:56pm
 
I might be able to help.  There is something called the Hershey Vector font, which is basically the alphabet encoded into arrays, which contain sets of coordinates to define each letter.  This data is freely available, and you just have to write a function to draw the characters.  But the cool thing is that there are Japanese characters too, Kanjis as well as the other sets.  So check it out, its highly documented on the web, and also is public domain.  

Here is a good starter link:

http://astronomy.swin.edu.au/~pbourke/other/hershey/

Good luck!
Re: Using Japanese characters
Reply #2 - Jun 27th, 2006, 2:10am
 
have you tried increasing the memory available (discussed in the faq) or using a smaller font size?

loadFont() should have less memory overhead than createFont(), and using the "Create Font" tool should only be a matter of properly increasing the available RAM.
Page Index Toggle Pages: 1