TextService temporarily breaks when triggering TextLabel AutomaticSize at runtime

Repo:
Repo.rbxl (72.7 KB)

TextService will return the wrong TextSize with non-default Fonts for a few frames upon triggering the AutomaticSize of a TextLabel with a non-default Font at runtime.

  • I’ve only managed to get this to occur by setting the CanvasPosition of a scrolling frame in the same container as the AutomaticSize TextLabel.
    • Update: This can also be triggered by simply indexing the AbsoluteSize of the AutomaticSize TextLabel
  • Invoking TextService at any time before triggering the AutomaticSize will prevent the bug from occuring.

This behavior occurs in-game too

Expected behavior

Nothing should have any impact on TextService’s core functionality

A private message is associated with this bug report

3 Likes

Major Update:

It seems that simply indexing AbsoluteSize of the AutomaticSize TextLabel will cause this behavior to occur.

Repo:
Repo.rbxl (68.2 KB)

Hi @Arctic_Vibes could you try replacing your calls to GetTextSize with the async version and verify if the intended behavior occurs?
https://create.roblox.com/docs/reference/engine/classes/TextService#GetTextBoundsAsync

The intended behavior does occur with GetTextBoundsAsync, but this report was primarily in regards to GetTextSize.