Search Unity

  1. The 2021.2 beta is now available. To find out what's new, have a look at our 2021.2 beta blog post.
    Dismiss Notice
  2. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  3. Dismiss Notice

Bug Tiny text vertical line offset is incorrect

Discussion in 'Project Tiny' started by djsell, Mar 9, 2021.

  1. djsell

    djsell

    Joined:
    Aug 29, 2013
    Posts:
    65
    I know multiline is "experimental."

    The text layout missed a multiply by scale when increasing the baseline offset in TextLayout.

    Code (csharp):
    1.  
    2. fontBaseLineOffset -= (font.Face.Ascent + font.Face.Descent);
    3.  
    should be
    Code (csharp):
    1.  
    2. fontBaseLineOffset -= (font.Face.Ascent + font.Face.Descent) * currentElementScale;
    3.  
    Before:
    Screen Shot 2021-03-08 at 10.49.07 PM.png

    After:
    Screen Shot 2021-03-08 at 10.44.53 PM.png

    Also, it only works right for top alignment. I didn't bother to fix that bug because I don't need the others right now.
     
  2. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    319
    Multiline is not supported yet
    but will take a note of this bug
     
unityunity