Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Any Docs on fontSize calculation including StyleSheets, default size, object fontsize settings?

Discussion in 'UGUI & TextMesh Pro' started by bradbecker, Feb 8, 2022.

  1. bradbecker

    bradbecker

    Joined:
    Dec 26, 2014
    Posts:
    130
    Trying to figure out the rules for calculating final fontSize for rich text (TMP UI) where autosize is not turned on. If you set a font size on the object, it seems to override things, but it you leave it blank, it sets to 0 and is essentially invisible.

    I want to be able to allow a user to increase the size of the fonts globally to increase the UI size--and I want the ability during prototyping to scale all fonts to tweak all UI. So I'm setting the "normal" size in the stylesheet and using that as the fontsize basis, but seems like that's overridden on every object because of the default component settings.

    How do you set it up so that your UI fontsizes = normal size * current style's size modifiers?