Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question "Fake" Italic Font in Legacy UI Text

Discussion in 'UGUI & TextMesh Pro' started by ZAxisTechnology, Sep 27, 2023.

  1. ZAxisTechnology


    Sep 12, 2014
    Ive just made a custom font and imported it into Unity (using editor version 2021.3.19f1) and applied it to a UI Text component on a canvas. Note, Im not using TMP so this is the "legacy" text component.
    Im noticing that setting the Font Style to Italic does not change the font, while setting it Bold does indeed make it bolder. Im not familiar with how the Font Style works, but I had assumed it simply transformed the font, adding an outline or something for bold and applying skew for italic. I have several other fonts for which bold and italic do work, despite their font files not having defined sets for bold or italic characters. Im wondering if I didnt apply some setting when exporting the .TTF file for my custom font, or if theres some import setting in Unity that would fix this.
    Any tips / knowledge about how the Font Style works under the hood would be helpful!