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. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Feature Request Disabling Italics

Discussion in 'UGUI & TextMesh Pro' started by Andrew-Carvalho, Mar 3, 2023.

  1. Andrew-Carvalho

    Andrew-Carvalho

    Joined:
    Apr 22, 2013
    Posts:
    37
    I was wondering if there is a way to disable italics for specific fonts. In some cases, notably CJK, italics are not generally used and I want to disable the automatic itaclicizing of the font regardless of style or rich text. I'm currently using version 3.0.6 in Unity 2020.3.35.

    I tried to adjust the Italic Style property to 0, but apparently this is not allowed by the custom editor due to this logic:

    Code (CSharp):
    1. EditorGUILayout.PropertyField(font_italicStyle_prop, new GUIContent("Italic Style"));
    2. font_italicStyle_prop.intValue = Mathf.Clamp(font_italicStyle_prop.intValue, 15, 60);

    Is there some other way to turn off italics on a per font basis in a global way? If not, is the hardcoded minimum of 15 there for a particular reason? I could embed the package and edit that hardcoded value but I'd prefer to leave the package linked to the Unity Registry if possible.