Search Unity

[Solved] Question marks using Glyphicons font in Unity

Discussion in 'UGUI & TextMesh Pro' started by jeffrey08, May 13, 2016.

  1. jeffrey08

    jeffrey08

    Joined:
    Nov 4, 2015
    Posts:
    6
    Hiya!

    I'm currently experiencing a lot of difficulties using the Glyphicons font with Unity. Either the font doesn't show any character or it shows little squares with question marks. I'm using the UI Text element to display the text in this font.

    The font is in the otf format. I've also converted it to ttf, to see whether that would make a difference. I've also tried it using code and changing the character set of the document (UTF-16, UTF-8, and ISO 8859-15). I tried changing the default 'Dynamic' value for the Character setting to Unicode, but also without success.

    The weird thing is that some of the characters work, but others don't. The best I could come up with looks like this on iOS:



    One character shows, while the others don't. Some characters I can copy/paste to MonoDevelop, others I can't. Some characters work when I use the GUI of Unity and paste them in the properties panel, but more often than not they don't work.

    I can't seem to determine where the issue lies and I'm afraid I'll have to revert back to using images instead of a scalable font.

    Did someone get the Glyphicons font to work with Unity? If so, how did you get it to work? Suggestions and ideas are also very welcome!

    Thanks in advance.

    With kind regards,

    Jeffrey
     
  2. jeffrey08

    jeffrey08

    Joined:
    Nov 4, 2015
    Posts:
    6
    Instead of trying to fix it from within Unity, I've managed to make it work by creating a custom version of the Glyphicons font. I'm guessing that the private set currently used for the glyphs within the font, makes it incompatible with how Unity works and builds towards iOS. So instead of using the private set within the font, I've copied the glyphs to regular characters like the exclamation mark and hashtag characters.

    So custom fonts with private sets of characters within the font, can work if you adjust the font and use regular characters for the glyphs.
     
  3. pfreese

    pfreese

    Unity Technologies

    Joined:
    Feb 23, 2015
    Posts:
    85
    What are the codepoints of the glyphs you are trying to render? Unity currently only supports glyphs from the Basic Multilingual Plane (U+0000 to U+FFFF).