How does roblox work out the amount of pixels a username takes up in the chat?

I want to know how roblox works out the amount of pixels the name takes up.
lTAvxzx5

When sending a message, the chat places multiple whitespace characters before hand
d2tKYxk2
image

I’ve assumed already that the characters are mapped out manually and are indiviually checked, if that is the case can someone direct me to where I can find these? If not can someone then explain how

This function returns text size in pixels so it may help

1 Like