How can I set the UI Text font size higher than 300px ? | Unity 5.4

The maximum UI Text font size can’t be set higher than 300, but I want it to be like 500 or something.
Is there a free way of doing this ?

Thanks in advance.

You can set a bigger size changing the fontSize field with a script. A simple example:

Add a Canvas with a Text child. Set the Canvas to scale with screen size and put something like 1920x1080. Set the Text’s anchor to stretch vertical and horizontal and make sure top, bottom, left and right are 0. Add this script to the Text.

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class TextSizeTest : MonoBehaviour {

    [SerializeField]
    int size = 300;

    Text t;

    void Awake() {
        t = GetComponent<Text> ();
    }
	
	void Update () {
		t.fontSize = size;
	}
}

Press play and try different values in the inspector.

I just tested with the default Arial font and another .ttf that I imported. The max may be different for different fonts with more characters.

You don’t need to increase the size of the font, you just need to scale the transform of the object that your Text component is on. There’s almost no scenario where manually increasing the font size past 300 makes sense.

To get a font size equivalent to that of a 500 size, try scaling your font to 100 and then setting the scale to 5,5,5.