Search Unity

TextMesh Pro Help on vertical text scaling

Discussion in 'UGUI & TextMesh Pro' started by KelShaded, Sep 12, 2018.

  1. KelShaded

    KelShaded

    Joined:
    Aug 18, 2017
    Posts:
    8
    Hey guys,
    If my text components are consistent but my font assets and text are dynamic and auto size is on,
    Is there anyway to ensure scaling consistency between different fonts? (without using the content size fitter for performance reasons)
    Cheers
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    From a performance and visual design consistency point of view, my recommendation is to only use "Auto size" to test / determine the optimum point size for a group of text objects. Usually, you only need to test the largest block of text. Once this optimum point size is found, disable "Auto size" and apply this same point size on remaining text objects. This ensures best performance and a uniform point size on all these text objects.

    Now to provide more insight, I'll need more information on your use case like:

    What do you mean by "text components are consistent"? All the size RectTransform size?

    Can you provide more details on how these different fonts are used?

    Can you share some image showing the expected results?
     
  3. KelShaded

    KelShaded

    Joined:
    Aug 18, 2017
    Posts:
    8
    Hey Stephan_B, Thanks for your answer.
    We are trying to work from a fixed number of UI templates, So as an example, The button template is used for every kind of button in the game,
    However, Should this be a button representing hard currency confirm the source sprite would be gold, and the font asset Times new roman bold, as compared to soft currency confirms blue sprite and Ariel italic for example.

    ATM we notice that the different fonts have noticeable scale variance that we're working around by fudging the Face Info of all our font assets to get them to be more consistent when using the same size settings on the template.
    Not using auto size seems like it will be really challenging when we localise,
    Also as I understand it, Auto size only has performance overhead during frames where the bounds are recalculated, Is that wrong?