Search Unity

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?