Issue Type: Display
Impact: Moderate
Frequency: Often
Date First Experienced: 2021-03-22 22:03:00 (+00:00)
Date Last Experienced: 2021-03-28 20:03:00 (+01:00)
Reproduction Steps:
Run this script in the command bar in Studio, or load the attached place file. Observe the created text label (changing the text label’s size makes the bug inconsistent, so it’s set in pixels).
local demo_gui = Instance.new("ScreenGui")
local demo_label = Instance.new("TextLabel")
demo_label.RichText = true
demo_label.Size = UDim2.new(0, 500, 0, 400)
demo_label.Parent = demo_gui
demo_label.TextScaled = true
demo_label.MaxVisibleGraphemes = 11
demo_label.Text = [[<font face="GrenzeGotisch">Lorem ipsum dolor sit amet, <font color="rgb(108, 209, 255)">consectetur adipiscing elit,</font> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font>]]
demo_gui.Parent = game.StarterGui
MaxVisibleGraphemesLineBug.rbxl (24.1 KB)
Expected Behavior:
Text label should display “Lorem ipsum” (the first 11 graphemes), as MaxVisibleGraphemes is set to 11, and no further text. Increasing MaxVisibleGraphemes by 1 repeatedly should continue to display 1 more character each time.
Actual Behavior:
Text label says “Lorem ipsum”, then a gap (the remainder of lines 1 and 2 are hidden as they should be), then “sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.” (the 3rd to 5th lines of text, which should be hidden, are shown as well).
Increasing MaxVisibleGraphemes to a number past the beginning of the erroneously displayed text causes it to correctly hide the remainder of the text (no image provided as this is the expected behavior, but setting MaxVisibleGraphemes to 100 in the example will demonstrate this).
Workaround:
Moving the first </font>
tag to before the comma or after the space will cause this bug to no longer occur, with minimal visual impact.
Changing the comma to a period will not affect the bug, so it’s not specifically the comma character.
Triggers bug:
Text = [[<font face="GrenzeGotisch">Lorem ipsum dolor sit amet, <font color="rgb(108, 209, 255)">consectetur adipiscing elit,</font> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font>]]
Does not trigger bug, visually identical result:
Text = [[<font face="GrenzeGotisch">Lorem ipsum dolor sit amet, <font color="rgb(108, 209, 255)">consectetur adipiscing elit, </font>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font>]]