UTF-8 Support in Unity iPhone 1.6?

I am trying to write some equations that using some special characters, such as naught () or squared (). I am using Javascript and authoring in TextMate. File encoding in TextMate is set to UTF-8. The characters render in TextMate. The characters even render in a call to Debug.Log. However, these characters won't render when used with the GUI class, such as GUI.Label.

Does Unity iPhone support the display of UTF-8 characters via the Unity GUI class? If not, is there a work around (GUISkin or GUIStyle) or must I find a different method (display as image)?

Thanks, Christopher

more ▼

asked Mar 08, 2010 at 09:27 PM

avatar image

45 10 14 15

Does unity have a TTF font size limit? I'm running into problems with fonts like Arial Unicode MS and Bitstream Cyberbit and am wondering if their size is too large to handle as a texture due to the number of glyphs (50k and 30k, respectively).

Mar 09, 2010 at 08:02 PM chrstopherbrown
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Should work. Maybe the font that you are using doesn't support these characters. Try changing the font of the skin to something like Monaco or Verdana and check if you have the same result.

more ▼

answered Mar 08, 2010 at 09:39 PM

avatar image

2.6k 15 47 61

Clarification: The font applied in the GUI in Unity or the font used in the text editor?

Mar 08, 2010 at 09:43 PM chrstopherbrown

@chrstopherbrown In the GUI in Unity.. if you change to Monaco can you see the squared?

Mar 08, 2010 at 11:24 PM Lipis

I've been using Font Book in conjunction with Special Characters in order to see which glyphs any font contains. The only problem I'm running into at this point is that not all the characters in any given font will render in TextMate, let alone Unity. Another stickler seems to be Arial Unicode; it has over 50k glyphs but won't render nicely in Unity GUI at all!


Mar 09, 2010 at 07:19 PM chrstopherbrown

I'm marking this as "the answer," though I don't feel I've received satisfaction at no fault of the community. It seems rendering mathematical equations in text as I would like to do is not what Unity was built to do. Back to the drawing board!


Mar 10, 2010 at 08:18 PM chrstopherbrown

@chrstopherbrown actually I also have to deal with some mathematical equations in Unity.. so if you ever come up with an actual solution, just let me know somehow :) Maybe in version 3... it's coming soon!

Mar 10, 2010 at 08:47 PM Lipis
(comments are locked)
10|3000 characters needed characters left

The squared character displays fine with the built-in font, although naught doesn't. If you're not using the built-in font, for the squared character at least, make sure you're importing using Unicode and not ASCII. The naught character may need a custom font.

more ▼

answered Mar 08, 2010 at 09:47 PM

avatar image

115k 59 232 729

I have verified that the font encoding is Unicode when I increased the font size. No success yet using Monaco.

Mar 08, 2010 at 09:52 PM chrstopherbrown
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Mar 08, 2010 at 09:27 PM

Seen: 3035 times

Last Updated: Mar 16, 2010 at 11:02 PM