Increase max text size

As a Roblox developer, it is currently too hard to render very large text, this is because the engine limits font size to 100.

This is a problem when creating a large SurfaceGui, to make text render bigger, the resolution of the SurfaceGui needs to be lowered, otherwise a massive amount of padding suddenly exists in the Gui.

The 100 (previously 72, i think?) limit was because Roblox used to use spritesheets for text, but I’m pretty sure Roblox renders font vectors directly now, so it seems a bit odd to restrict font size to 100.

If Roblox is able to address this issue, it would improve my development experience because I could render much larger text.

35 Likes

100% support. Especially for text displayed in 3D space, 100 is much too small. You are forced to use a UIScale to resize the text which only resizes the text (making it blurry).

2 Likes

RichText allows you to increase text size to whatever you want, thank me later.

6 Likes

It becomes pixelated for some reason

5 Likes

I think this is because there is a limited amount of space on the “font atlas”, an image that’s used to render text. In order to render text, the engine first renders the font at the size the text appears at to the font atlas. In order to get larger text without destroying quality, the font needs to take up more space on the atlas, reducing how much space there is for other bits of text. I believe this is why there is a limit on how far you can truly scale up text, because otherwise it can be easier for the font atlas to run out of space, causing this to happen:

(Mobile specifically seems to have this problem, as it looks like the font atlas was intentionally shrunk there.)

You can read an explanation on why this happens from a Roblox employee, and what someone can do to prevent this from happening to their own games, here:

Maybe what they could do to satisfy this feature request is to use the method RichText uses when the font starts taking up too much space on the atlas, and to just scale up the texture without rendering it at a higher quality. While this can result in text being more pixelated, it’s better than a hard limit. Maybe, instead of rendering the same font multiple times to the atlas, only the highest-quality version is (assuming the above post still holds true).

EDIT: I seem to have missed the part about SurfaceGuis! In that case, you can reduce the PixelsPerStud property, which should provide you with the same effect (with the downside) that RichText does as @InsanityFE4R mentioned, just more convenient, I think.

3 Likes

That’s not Roblox’s problem, you think that people make text in 4k? There’s a reason they limit it to 100 px, that’s because there’s no reason to go higher than that.

3 Likes

It becomes problematic on higher resolution screens for text that needs to be quite large, because you might be right up against the limit to get the effect you want, and everything can fall apart when the text stops getting bigger at a seemingly arbitrary limit. If the engine lets you make text even bigger than what TextSize would normally lead you to believe, then why shouldn’t it be the default? Why does it need to be behind a RichText tag?

2 Likes

No, there’s no reason to use a size larger than 100 px, there’s nothing Roblox can do about it, people have to draw these fonts manually, there’s very few reasons to put in the effort for larger text sizes. Higher Resolution screens are not common, 1080p is the most common resolution for monitors and 100px is more than enough.

2 Likes

I may add this affects floating GUIs(i know they’re called bilboardguis) as well, if you get very zoomed in on them, the text starts to not follow the rest of the GUI since TextScaled is also capped at 100.

2 Likes

No reason to call it the wrong name, many other game engines call it Billboard as well so you’re not helping yourself. Just use RichText, also no player is going to put up a telescope on a few pixels to see if the font is blurry or not, so there’s nothing to worry about.

1 Like

Bumping, a solution for this really ought to be in order by now.

Roblox already has a Bezier-based font rasterizer which can render fonts at any resolution with no loss of quality, it’s limited to 100px for no reason other than the possibility of a performance regression, but I think that 100px is heavy handed and unnecessary for the devices that larger fonts are aimed towards.

For ScreenGUIs & Billboards: While mobile doesn’t really care, since they’re on small screens and TextScaled would limit the font size anyways, for desktops, this has been needed for a while, 100px really just isn’t enough in many cases, rasterizing say, 240px fonts wouldn’t be a concern for PCs and the 2048x2048 glyph atlas is plenty big enough for this too.

SurfaceGUIs are a bit more tricky though since they are a fixed size or scaled based on the part size, not the size of the screen resolution, and I’m 99% certain that mobile devices have a reduced glyph atlas size. (less memory usage, and they also tend to not need to render as big of glyphs anyways for the reason mentioned above.)

Certainly we could have ScreenGUIs and Billboards at the very least by now, though? It was said at one point that Billboards were going to allow TextScaled to rasterize fonts at a size greater than 100px to prevent the text from shrinking when you get close to them years ago, but that hasn’t ended up happening yet unfortunately. But it does show that Roblox is aware that there are some cases where this would be a good thing to have.

Update: Roblox doesn’t have support for SVGs, which is the reason fonts are pixelated at higher resolutions. So until Roblox supports SVGs, we’ll just have to suffer.

This is slightly misleading - Roblox doesn’t use SVG, but they do use a TTF based font pipeline which is also lossless just like SVG because they’re both font rendering schemes, no bitmaps are used for Roblox’s native fonts.

The reason why it’s pixelated at higher resolution is because of the maximum font size of 100 - beyond this point they use an upscaled version of the 100 size glyphs because rasterizing them is seen as too expensive to compute and they would take up too much space on the font atlas.

This is particularly a problem for higher resolution displays because font rasterization is based on pixel size. So if you have a 4k display, 100 font size is actually quite small compared to 100 font size being pretty much perfectly adequate for the majority of cases on a 1080p screen, which is why some people have huge issues with font quality whereas others don’t have a problem at all.

100 font size without rich text scaling on 1080P vs 1440P:
image

image

(This is an absolute worst case scenario short text string at a big size with a background gradient, just as an example.)

While the difference in size may seem minor - do note that small differences in this relative screen coverage can become major pixelation when scaled using rich text scaling (if you zoom in on each image, both of them have pretty gnarly pixelation, but the 1440p image is significantly worse), this means if you want to use large text on screen that scales to all screen sizes, you’re pretty much just gonna have to accept the pixelation which is suboptimal and no other engine I know of has this issue.

Not to say that a solution is easy, the font atlas does not have a lot of room for larger glyphs in it’s current state, but it’s certainly not an impossible situation and there are several ways that this can be solved.

I would propose that the font atlas size, and by extension, maximum font size, should be dynamic based on the screen resolution. (Which, to a certain extent, it technically is, as mobile devices have smaller font atlases.)

Edit: I didn’t talk too much about speed here because for desktops it’s irrelevant, but rendering huge glyphs does have a performance concern if done on mobile devices which is why I think a larger font atlas should be particularly for larger screen resolutions where the end user is more likely to be on a more powerful machine and the quality increase would be significant enough to warrant any possible performance loss.

4 Likes

To clarify, it isn’t limited ‘for no reason other than a performance regression’; afaik all fonts are stored in the font atlas (as you mention later in your post and a subsequent reply) and larger font-sizes take up more space on that atlas. Increasing the maximum font size without changing anything else would cause a lot more text flickering as experiences reach the maximum atlas size.

It is also worth noting that each different font requires space on the atlas; if you are using multiple sizes of that font, each size is loaded onto the atlas (not just the biggest size). Since a lot of experiences use a lot of different fonts and TextScaled encourages using a lot of different sizes, it creates a pitfall for overloading the atlas. It’s something some experiences have already run into without increased font sizes. Ideally, if this is to be added; we as developers shouldn’t need to worry about overloading the atlas, for convenience’s sake.

This isn’t to mention the potential backwards compatibility issue with some experiences expecting fonts to cap at 100 size, albeit a toggle to turn this on / off could probably solve that.

1 Like

My apologies, but I’m unsure as to what you mean here, as that is effectively what I’ve said, a larger font atlas has a performance cost as does the computation of rasterizing the glyphs to put in that atlas. Which are the key reasons why it’s limited in the first place.

Yeah, that’s why I think the atlas size (and by extension, max font size) should be increased, not universally, but based on the screen resolution of the device. (I erroneously said in my initial reply that the current maximum of 2048^2 is large enough for 240pt font, it probably is if you’re using just a few fonts, but not with more than that.)

I decided to test just to see and purposefully filled up the entire screen with 100pt fonts (all characters on keyboard), even after 20 fonts it wouldn’t flicker at all on my PC, only on my phone, which does confirm my theory that phones do indeed have smaller atlas sizes.

I think this is pretty unlikely to happen on accident except on low end phones and even then 100pt fonts are pretty much never used on mobile because of TextScaled. (Should also be easy to fix when it appears.)

A toggle would probably be the best solution, but given that Roblox is going to be launching a per-player text scaling option rather soon, and they seem to dislike implementing developer control for features like these, they may be on the path to breaking backwards compatibility with this regardless.

The amount of usecases that’ll effect is pretty big, but for just “generally increased max text size” you have UITextSizeConstraint so it should be easy to work around.

1 Like