Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    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:
    45
    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.