Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Performant outlines on bitmap fonts

Discussion in 'UGUI & TextMesh Pro' started by Zebbi, Apr 28, 2021.

  1. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    521
    After many years of waiting, is there a solution in 2021 to this? I don’t mind manually drawing outlines manually into the atlas, but they get cutoff by TextMesh for some reason. Is there a step by step method of adding outlines and shadows that are pixel sharp and don’t use that horrible dilation system?
     
  2. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    521
    This:
    upload_2021-4-28_22-42-3.png

    Looks like this in Unity:
    upload_2021-4-28_22-42-31.png
     

    Attached Files:

  3. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    521
    Okay, here's the secret sauce:
    upload_2021-4-29_10-35-22.png upload_2021-4-29_10-35-6.png
     
  4. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    521
    Bonus trick, load this into Asprite and turn the black text into white:
    upload_2021-4-29_11-5-46.png

    Add outline:
    upload_2021-4-29_11-6-10.png

    Finally, ad a shadow by duplicating the original black text layer and offsetting underneath.