RichText bug - going from bold to italic or vice versa results in no visual change

When setting text on a TextLabel with RichText enabled, it is expected that the rich text tags will be displayed correctly. However, bold and italics will keep the other from being properly set on the label until there’s been a “reset”, where there’s no rich text tags applied on the TextLabel.

Steps to reproduce:

  1. Create a TextLabel and put it in a ScreenGui under StarterGui
  2. Make sure RichText is enabled
  3. Set the text to something like: “Hello <b>world</b>”
  4. Then set the text to “Hello <i>world</i>”
    (expected: the text will turn to italics, actual: it stays bolded)
  5. Then set the text to “Hello world”
  6. Try again setting it to “Hello <i>world</i>”, and success.
2 Likes

Thanks for the report! We’ll follow up when we have an update for you.

This also occurs with fonts, and it only happens when the change between them is more than 0.05 seconds.

repro.rbxl (59.6 KB)

local label = script.Parent

-- note: for my own testing, anything above task.wait(0.05) breaks and below it works fine

label.Text = "<b><i><font face='PermanentMarker'><font color='rgb(255, 0, 0)'><font size='40'>PERMA-BAN</font></font></font></i></b><font face='Nunito'><font color='rgb(255, 0, 0)'><font size='30'><b>  A PLAYER</b></font></font></font>"
task.wait(0.5) -- Adding a yield (>0.05) makes the font-changing break
label.Text = "<font face='FredokaOne'>Test</font>"

Expected behavior:
image

Current behavior:
image

Hi @Avatar_Korra !, I know it took us a while, but we fixed this :),
Please let me know if it works as expected to close the issue.

@Jumpathy we tracked the font leak issue with If you use RichText with some tags like <b>, <i>, and change font, text which got affected by <b/i> won't change font it should be fixed as well, please let us know there if that problem persists for you.

1 Like