[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [bos-dev] implement Chinese?



Sorry, this mail got stuck behind a few windows, should have gone out first...

Jimmy Salmon wrote:
You'll also need to change the source code so it draws more font characters.
#define X 32
#define Y 16
The program crashes when I do that. I tried to set Y to 500 for a start...

dl7und@draal:~/tmp$ ./ttf2png uming.ttc 14
*** glibc detected *** ./ttf2png: free(): invalid pointer: 0x08aa2a38 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7e703f4]
/lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb7e72456]
/usr/lib/libSDL-1.2.so.0(SDL_FreeSurface+0xc5)[0xb7fd25c5]
./ttf2png[0x804944b]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7e17685]
./ttf2png[0x8048d01]

What ttf file are you using? The dejavu font should support all of Unicode which includes Chinese characters.

No, Dejavu does not support CJK characters. The attached image was done with a Japanese font, Kochi, which is 7MB. The Chinese fonts I have here are usually larger than 10MB. (Arphic for example, if you are on Linux)

Regards,

Olaf