Search Unity

Resolved 2022.2 Italic tag only works on the first line of a label set to wrap normal

Discussion in 'UI Toolkit' started by sharkbitgamesdev, Dec 12, 2022.

  1. sharkbitgamesdev

    sharkbitgamesdev

    Joined:
    Dec 2, 2019
    Posts:
    18
    Pretty much just the title. If you use the <i> tag, it doesn't matter where you end it if the label is wrapping the text, the tag will only be applied to the first line.

    <i>The result looks
    something like this.</i>

    This in 2022.2.0f1.
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,293
  3. sharkbitgamesdev

    sharkbitgamesdev

    Joined:
    Dec 2, 2019
    Posts:
    18
    Never mind, I went to create a second project to send an example along with the report and found out it was happening only in my old project. I fixed it by replacing the old default unity theme with the new project's default unity theme.

    I don't think I ever really altered the old theme, so maybe it was something that happened when switching unity versions? No clue what caused this.
     
    karl_jones likes this.
  4. sharkbitgamesdev

    sharkbitgamesdev

    Joined:
    Dec 2, 2019
    Posts:
    18
    HugoBD-Unity likes this.
  5. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    499
    I was able to reproduce the issue, thanks for bringing this up we'll look into it.

    Note that it only happens when using the "synthetic" Italic. If your font asset has a font asset assigned for italic in the font-weight fallback table it will not show the issue.
     
    karl_jones and sharkbitgamesdev like this.