Search Unity

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:
    44
    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.