Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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:
    77
    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