japanese character support?

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
sjk1
Posts: 2
Joined: Thu Sep 08, 2005 10:23 pm

japanese character support?

Post by sjk1 »

hi! i'm developing (well, trying to :-)) a kanji quiz game - it displays the kanji character, and you have to select the proper translation or reading for the kanji.

is there a way to "print" a japanese character? i read the lua doc./wiki pages, and it is rather confusing - at least i didnt get it (quote: "you would need to either manually encode them to UTF-8, or insert individual octets in the correct big-endian/little-endian order (for UTF-16 or UTF-32)" - how do i do this?).

eg, i have the unicode 6771. i'd like to see, printed in the screen, the japanese character that represents "east".
liquid8d
Posts: 66
Joined: Thu Jun 30, 2005 6:29 am

Post by liquid8d »

Since it is so easy to use a tile system with images in lua, I would just suggest using a premade image with the necessary characters. Should be easy enough? :)

LiQuiD8d
nevyn
Posts: 136
Joined: Sun Jul 31, 2005 5:05 pm
Location: Sweden
Contact:

Post by nevyn »

I saw some PSP homebrew app that used real TTF fonts. If someone finds that code, either that person could integrate it into luaplayer him/herself or maybe me or Shine could do it. With that, any character supported by the TTF should be supported by luaplayer. This is a Very Nice Thing ;) (I'm a big Unicode fan)
LuMo
Posts: 410
Joined: Sun Aug 21, 2005 2:45 am
Location: Austria
Contact:

Post by LuMo »

would save some space from images (could be replaced by simple text)
would be great :D
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

nevyn wrote:I saw some PSP homebrew app that used real TTF fonts. If someone finds that code, either that person could integrate it into luaplayer him/herself or maybe me or Shine could do it.
This could be done with the freetype lib, which is in SVN.
LuaNoob
Posts: 4
Joined: Wed Sep 21, 2005 12:13 pm

Post by LuaNoob »

Hi! this is my first post.

About:
is there a way to "print" a japanese character? i read the lua doc./wiki pages, and it is rather confusing - at least i didnt get it (quote: "you would need to either manually encode them to UTF-8, or insert individual octets in the correct big-endian/little-endian order (for UTF-16 or UTF-32)" - how do i do this?).
I tested encoding a text file in unicode, utf-8 , unicode big endian, and in all cases I couldn't see the japanese text, I mixed roman letters and japanese characters and only got the roman ones in some cases and in others just garbage.

Any ideas how to achieve this in LUA?
I also got the same idea about the japanese game...

Thanks for any ideas.

By the way, I found this : http://lua-gd.luaforge.net/ for Lua, but dunno how can I put it to work in a PSP, or maybe it is not possible?
LuMo
Posts: 410
Joined: Sun Aug 21, 2005 2:45 am
Location: Austria
Contact:

Post by LuMo »

gd is nice... as i tested it in PHP (load ttf write with ttf :D)
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Post Reply