Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

bug rendering languages

Discussion in 'Editor & General Support' started by protron, Aug 4, 2014.

  1. protron

    protron

    Joined:
    Nov 7, 2013
    Posts:
    8
    Hi!

    I have been using Unity3d font rendering several languages like russian, chines, english and so on. Now I need to add support for the georgian language. It should work like all other languages, but unfortunately it doesn't. I'm wondering if there will be similar problems with other languages that are part of Arial Unicode when Unity runs into problems with some of them.

    Here is what I've tried:
    1) I tried to render a string that contains georgian language data. Result: Unity renders an empty string.
    2) I tried to do copy and past on windows into the Inspector window (both: GUIText and TextMesh). When I do that, Unity pastes nothing into the text box located in the inspector window. When I mix georgian strings with other languages, like english or russian, only the non georgian characters are being inserted. When I paste the same text into other programs, like notepad or even MonoDevelop, it works as expected and all characters are being inserted.

    The thing is: What other languages will not work? My project needs support for all languages that are supported by Arial Unicode.

    Here are three strings written in the georgian language:
    ადამიანი
    ქალაქი
    ტყე

    You should see the problem when pasting those into the Inspector of a GUIText. Unity inserts a string of length zero for those characters.

    I hope there's somebody out there who can explain this strange behaviour of Unity for this language!

    Thank you
     
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    I'm on a Mac, using Unity 4.5.2f1. Adding a GUIText and pasting the first of your 3 Georgian strings into the Text member gives me correct rendering when I hit play.
     
  3. protron

    protron

    Joined:
    Nov 7, 2013
    Posts:
    8
    Hi Graham,

    thank you for your reply.

    I'm currently on Unity 4 (4.3.4f1), operating system is Windows 8.0 . I cannot get the newest version of Unity at the moment to try it out. Internet access is restricted here. But if you didn't fix bugs in font rendering since Unity 4.3 there's a good chance this bug is still present in the Windows version of Unity.

    I have attached a screen shot showing the standard notepad of Windows containing a string "the city....yy" with some georgian characters in it. When I copy & paste this string from notepad into the GUI Text field of a new Unity project, as you did, it inserts only "the city xxyy" without the georgian letters. If I insert the georgian text you have inserted on your Mac, it insert nothing because it contains only georgian characters.

    When I set text programatically, with text loaded from an xml file, the behaviour is similar. Unity renders nothing. So it is (or was, if the bug is fixed in Unity 4.5) not just a problem of the inspector window.

    However, when I build an Android app and run it, the georgian strings that I set from the xml file are rendered without problems! When I build a Windows exe file of the same unity project and run it, the georgian strings are not rendered. My clonclusion is that this is, or was, a bug in the Windows version of Unity.
     

    Attached Files:

  4. protron

    protron

    Joined:
    Nov 7, 2013
    Posts:
    8
    ...one more thing:

    The Android app renders georgian letters correctly on my Samsung Galaxy Note 10.1 running Android 4.1.2. But when I run the same Android app (apk file) on a Samsung Galaxy Tab (GT-P1000) running Android 2.3.6, the georgian characters are not being rendered.
     
  5. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    I just tried on Win7 running 4.3.0f4. I can get lots of Unicode characters into the GUIText.text, but not Georgian ones, which leads me to assume that the Ariel font that Unity is using does not have those glyphs. I imagine it works on some Android devices because the system font that Unity picks up does have those glyphs.

    On this Win7 machine, starting the Character Map app, and choosing Ariel gives me a view of the glyphs in that font. If I tick Advanced view and then search for the ა character I get no returns. There does not appear to be any glyphs between U+076D and U+1D00. The first Georgian character in your first post is U+10D0. (I've looked and not found any fonts that have Georgian support. :-()
     
  6. protron

    protron

    Joined:
    Nov 7, 2013
    Posts:
    8
    Thank you very much for clarification, Graham!

    What I've found so far is, that Windows 8 displays those Gregorian characters, but not in Arial. When I change the font to Arial for the entire text in Wordpad, those characters keep their old font while the other languages change.

    About the language support of Android: I found out that my Unity app on Android 4.1.2 (Galaxy Note 10.1) doesn't support all Gregorian characters. Not being able to read it I previously thought it supports the language after seeing some right characters being displayed. The device itself supports them, e. g. on web pages. On the Internet I read that there are fallback fonts for Gregorian characters. Android seems to have a chain of fonts being used to display text. If only one font is being used, e. g. Arial, the lacking characters will be missing. It's probably the same with Windows.

    So it seems to be a font problem and it's clearly not Unity's fault.

    It's puzzeling for me why there is not yet a free font with all characters of the world's countries in it. Gregorian needs only 33 characters, and no additional symbols are needed for upper / lower case.

    I'm going to look for some additional fonts to render those characters (which look really beautiful btw). The Android source files should show me which fallback fonts are needed, and in theory those fonts should be open source.
     
  7. lukaodzelashvili

    lukaodzelashvili

    Joined:
    Jul 3, 2020
    Posts:
    3
    @Proton wich font is it? i have the problem too