Question about Unicode characters?

Game Editor comments and discussion.

Question about Unicode characters?

Postby andykk » Sun Jul 08, 2012 7:05 am

Does anyone know how to display Unicode characters in the Game Editor?
Characters like Ư, Ô, Ê, Ứ, Ố, Ế, Ạ, Ặ......

Thanks
andykk
 
Posts: 5
Joined: Sun Jul 01, 2012 4:44 pm
Score: 0 Give a positive score

Re: Question about Unicode characters?

Postby skydereign » Sun Jul 08, 2012 7:12 am

The current gE version doesn't have unicode support. But you can create custom bmp fonts that can display them.
User avatar
skydereign
 
Posts: 3395
Joined: Mon Jul 28, 2008 8:29 am
Score: 565 Give a positive score

Re: Question about Unicode characters?

Postby andykk » Sun Jul 08, 2012 7:25 am

thanks sky, but, can you give me an example? :(
andykk
 
Posts: 5
Joined: Sun Jul 01, 2012 4:44 pm
Score: 0 Give a positive score

Re: Question about Unicode characters?

Postby skydereign » Sun Jul 08, 2012 7:39 am

Here is an edited version of a font pyrometal made. The 0-7 characters have been replaced with the unicode characters you specified. It isn't a very nice implementation, but for now it is what works. To display the font, add it with the space characters as the initial character as the space character, and it should auto set to 91 characters.
Attachments
pyro_font_edit.png
pyro_font_edit.png (962 Bytes) Viewed 263 times
User avatar
skydereign
 
Posts: 3395
Joined: Mon Jul 28, 2008 8:29 am
Score: 565 Give a positive score

Re: Question about Unicode characters?

Postby andykk » Sun Jul 08, 2012 8:04 am

I mean, I do not know how to read a character string to get the bitmap image and display it

Sorry for my bad english!! :(
andykk
 
Posts: 5
Joined: Sun Jul 01, 2012 4:44 pm
Score: 0 Give a positive score

Re: Question about Unicode characters?

Postby skydereign » Sun Jul 08, 2012 8:09 am

So you don't know how to display text? You have to create a text actor (normal actor with a font file), give it a ttf or image file, and give it some default text. If you don't know how to do that, in the actor control panel, near the top right, there should be a button that says Text. Click that, and then New Font (from there it is pretty clear). Next you need to change the actor's text variable.
text_actor -> Create Actor -> Script Editor
Code: Select all
sprintf(text, "This is a test 01234567");

Following those steps the text actor should display the line of text in the quotes, except the 0-7 should be unicode characters.
User avatar
skydereign
 
Posts: 3395
Joined: Mon Jul 28, 2008 8:29 am
Score: 565 Give a positive score

Re: Question about Unicode characters?

Postby andykk » Sun Jul 08, 2012 8:31 am

oh no no, i mean how to use that bitmap file
:( :(
andykk
 
Posts: 5
Joined: Sun Jul 01, 2012 4:44 pm
Score: 0 Give a positive score

Re: Question about Unicode characters?

Postby skydereign » Sun Jul 08, 2012 8:35 am

Which is kind of what I told you.
skydereign wrote:You have to create a text actor (normal actor with a font file), give it a ttf or image file, and give it some default text. If you don't know how to do that, in the actor control panel, near the top right, there should be a button that says Text. Click that, and then New Font (from there it is pretty clear)

I'll be more clear. Create an actor that you want to be a text actor (has to be normal actor type).
In the actor control panel, click [Text].
Click [New Font]
Click [From image file]
Click File and find the image you want.
In the initial font char section, press space (since the first character in the font file I uploaded is space).
Make sure Number of font chars section says 91 (since there are 91 characters in the font file).
Click [Ok]
Type in some default text into the large text section.
Click [Ok]
Now your actor should be displaying the default text.
User avatar
skydereign
 
Posts: 3395
Joined: Mon Jul 28, 2008 8:29 am
Score: 565 Give a positive score

Re: Question about Unicode characters?

Postby andykk » Sun Jul 08, 2012 9:03 am

thanks :) now i have known how to use bitmap file :) but, it is quite inconvenient :(
i should find another better way :(
andykk
 
Posts: 5
Joined: Sun Jul 01, 2012 4:44 pm
Score: 0 Give a positive score

Re: Question about Unicode characters?

Postby skydereign » Sun Jul 08, 2012 9:14 am

Well there really isn't a more convenient way. I would have told you it if there were. The problem is gE can't take input unicode characters. It is theoretically possible to use chars to input ascii values that wouldn't normally be possible from normal character input, and then parse a given string to do replacements to these values, but that is far more inconvenient, and can be rather difficult. That being said there is still the char limit since unicode isn't supported. Long story short, unicode isn't supported. If you must use those characters, the custom font files are the way to go.
User avatar
skydereign
 
Posts: 3395
Joined: Mon Jul 28, 2008 8:29 am
Score: 565 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest