Search Unity

What is the best way to manage Fonts in Unity?

Discussion in 'UGUI & TextMesh Pro' started by AdmiralNines, Jan 9, 2020.

  1. AdmiralNines

    AdmiralNines

    Joined:
    Mar 26, 2019
    Posts:
    6
    If I'm building a website, I can set up all headings to look one way, and all paragraphs to look another, and the entire website will use those properties. I write it once, and I'm done.

    I'd love to be able to do something similar in Unity, but I'm not sure how to go about it. Right now, I'm just having to change the font and style every time I make any UI element. It's getting very tedious, and is very inaccurate (I don't always remember all the settings correctly.) I'm looking for others' experience in this particular area. Has anyone out there found an easy way to manage this?
     
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    Starting in Unity 2019, you can save preset component values to an asset and apply it to another component later. This includes text component settings, such as font and size. https://docs.unity3d.com/Manual/Presets.html

    I also really like TextMeshPro (which is free), but it has a bit of a learning curve. You can turn fonts into multiple "font assets" where you can fine-tune the rendering and spacing of specific font characters. From each Font Asset you can create multiple SDFs, which are materials that make your font more beautiful with colors, textures, outlines, glows, lighting, etc. You can re-use the font assets and SDFs on any TextMeshPro asset, and you can create TextMeshPro text both as a Canvas UI element or as a standalone world-space object.
     
  3. AdmiralNines

    AdmiralNines

    Joined:
    Mar 26, 2019
    Posts:
    6
    Awesome answer, Thank you! That's exactly what I wanted to hear. I'll have to look up how to do all that. :)