Search Unity

Smaller UI Text (Font = 1 and text is still big)

Discussion in 'Scripting' started by Gogin, Aug 29, 2018.

  1. Gogin

    Gogin

    Joined:
    Nov 9, 2013
    Posts:
    60
    Hi

    Have you any idea how to make UI Text smaller? Please see attached screenshot:




    Thanks
    Jan
     
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,962
    Font Size will make it smaller, but the problem is probably that your canvas and canvas settings are making even small text look massive.
     
  3. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    6,305
    I think instead of having the canvas and the text on one object, make the text object a child of the canvas object and you might see better results. I haven't played with the world space canvas that much, but I'm pretty sure that will help.
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    9,099
    When I was playing with UI in past, what I figured out, is giving bigger font value increases quality, but to make text small, simply resize object/canvas with text component.
     
  5. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    6,305
    Or...switch to Textmeshpro which is set to completely replace text component in a future version of Unity. :) Thus you can get a nice quality without having to oversize your text and then scale it down.
     
  6. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,682
    I agree with all of the above, but for the simple answer: your canvas scale is 1.865, when it should generally be 0.01 or so. And of course the width and height should be set 100x bigger. That approximate scale gives you reasonable text size on screen at a reasonable font size.
     
unityunity