TextLabels with X AutomaticSizing are based on the default “Source Sans Pro” font sizing until rendered, most immediately causing issues for developers trying to rely on properties at runtime, and additionally inconsistently causing incorrect spacing with UILayouts.
Repo File: Repo.rbxl (75.5 KB)
Expected behavior
TextLabel AutomaticSizing should be based on the selected Font regardless of if the element is rendered.
A private message is associated with this bug report
2 Likes
Hi @Arctic_Vibes our font pipeline will wait to load font assets until displayed on screen unless you use an API to ensure the loading of the font occurs. If you need guarantee that the font is loaded, please use the following API which will yield once the font has been fully loaded (regardless of on-screen visiblity):
https://create.roblox.com/docs/reference/engine/classes/TextService#GetTextBoundsAsync
The most immediate issue is the unavoidable uilistlayout inconsistency.