Search Unity

How to change size/style a GUI.Label on iPhone

Discussion in 'Immediate Mode GUI (IMGUI)' started by vegashacker, Nov 19, 2010.

  1. vegashacker

    vegashacker

    Joined:
    Sep 4, 2010
    Posts:
    18
    This seems like it'd be super-simple, but I can't seem to figure it out myself, and I can't find the answer by searching around. Anyway...

    On an iPhone app, I'm trying to display some bold text in a larger font size than whatever is default. From within Unity, everything seems to work fine by setting boldness and size with a GUIStyle, but as soon as I put the app on an actual iPhone, it just displays default size, and not in bold.

    The default size is even smaller on an iPhone 4 retina display.

    So the question is, how do I change the font size/boldness on a Unity iPhone app? I don't care about the particular font face. Anything default is fine for now.

    Thanks!
    Rob
     
  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    Please can you file a bug report for this (menu: Help > Report A Bug). Our head of iPhone development suspects this is a bug but we will get back to you if the problem turns out to have a simpler explanation.
     
  3. sekond_

    sekond_

    Joined:
    Nov 25, 2010
    Posts:
    5
    Hi there,

    I have the same problem on Android. Just want to display some text using different sizes.
    The text is rendered correctly in the scene viewer but the different text (size/bold) styles are not applied when rendered on the Android phone.

    Will this be solved soon or is there a workaround?
    I might try to use a transparent texture instead. Unfortunately, this is a static solution, which I won't be able to apply to dynamic text.

    thanks

    Sebastian
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    The workaround (or better correct handling and usage as mentioned in the docs) is: have different fonts

    On mobiles, dynamic font is not supported so all dynamic styling you apply will be ignored on iOS and Android.
    You need multiple fonts if you need multiple sizes
     
  5. QuantumCalzone

    QuantumCalzone

    Joined:
    Jan 9, 2010
    Posts:
    262
    Does this include having GUIText Font Size values different from 0? Because on my iPhone 4, no GUIText is visible if its not 0, using the default GUIText.