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. Dismiss Notice

All fonts displayed as the default font.

Discussion in 'UI Toolkit' started by UltraRobot, Feb 3, 2022.

  1. UltraRobot

    UltraRobot

    Joined:
    Dec 6, 2019
    Posts:
    24
    Probably something simple I've missed, but when using UI Builder and adding text, I cannot change fonts. The text displays with the same default font regardless which one I choose. If I try the fonts with the textmesh component, they work fine. Any ideas?
     
  2. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    440
    Hi @UltraRobot !

    In the text area of the UI Builder, you'll see that both a FontAsset and a Font can be set. Note that the default Font is actually a FontAsset and that FontAssets have precedence over Fonts. In other words, as long as you have a FontAsset assigned, changing the Font won't have an impact as it will be overridden by the FontAsset. Setting the FontAsset to None should fix the issue.

    We are aware this is confusion, and we plan to improve the UX to make this more obvious.

    I hope this helps!
     
  3. UltraRobot

    UltraRobot

    Joined:
    Dec 6, 2019
    Posts:
    24
    Thanks for the help, but realized I actually had to add and remove a font asset for the font to be used.

    My steps:
    - Add a text label. Font Asset is default None.
    - Try to change Font, nothing happens.
    - Add a Font Asset.
    - Delete the Font Asset setting, defaulting it back to None with a bolder text, (indicating it's overriding some inherited setting?)
    - Changing the regular font will now work.

    I do not have any stylesheets or default settings for a Font Asset as far as I know, and if I do, the default is "None"
     
  4. BusyRoots

    BusyRoots

    Joined:
    Jul 25, 2017
    Posts:
    40
    Same for me.
     
    HugoBD-Unity likes this.
  5. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    440
    Thanks for bringing this up @UltraRobot !

    Could you log a bug through the Unity Bug reporter (Help/Report a bug...) ?
     
  6. BusyRoots

    BusyRoots

    Joined:
    Jul 25, 2017
    Posts:
    40
    Bug report is filed: Case 1408340
     
    HugoBD-Unity likes this.