Boy_Emperor
Topic Author
Posts: 3
Joined: 28 Mar 2025, 07:28

Glyph does not fit in atlas

01 May 2026, 18:14

Problem: the glyph atlas is full. Here is the error message:
 Glyph '1ec' (28x62) does not fit in atlas (1024x1024). Consider increasing atlas size
I know that it is possible to increase the cache size (SetGlyphCacheHeight, SetGlyphCacheWidth), which I have already done up to 2048. However, I am not sure that this will fix my problem for long.

I have a cross platform online game. At the moment there is support for two languages. In the near future it is planned to add more languages. There is a shared in game chat where messages can appear in different languages. There are also various game interfaces that the player can open and close. These interfaces are displayed only in the language selected by the player. They use different fonts (Montserrat: Bold, Bold Italic, Regular, Medium, SemiBold, SemiBold Italic). In Noesis Inspector I observed that 1024 was filled very quickly. The 2048 atlas is already half full. When multilingual support is added, I am sure that 2048 will also overflow.

What are the possible solutions for multilingual applications where different glyphs fill the atlas and are not replaced quickly enough?
 
User avatar
jsantos
Site Admin
Posts: 4823
Joined: 20 Jan 2012, 17:18
Contact:

Re: Glyph does not fit in atlas

03 May 2026, 13:44

In 3.2.9 we added a new batching algorithm that increased a bit the pressure to the atlas memory. We should have increased the previous 1024x1024 default at that point, but unfortunately, this was done a few versions later.

The new default and recommended size for the atlas is 2048x2048. This should cover many scenarios and probably you won't need to increase it. But in case this is needed, the atlas memory is relatively "cheap" (it is single channel, one byte per pixel), so you can safely increase it to 4096x4096 for just 16MB.

Please keep us posted about this.
 
Boy_Emperor
Topic Author
Posts: 3
Joined: 28 Mar 2025, 07:28

Re: Glyph does not fit in atlas

04 May 2026, 10:38

Is it possible to force reset the atlas?
Last edited by Boy_Emperor on 05 May 2026, 09:03, edited 1 time in total.
 
Boy_Emperor
Topic Author
Posts: 3
Joined: 28 Mar 2025, 07:28

Re: Glyph does not fit in atlas

04 May 2026, 11:30

And is it normal that if a **Stroke** is applied to text, the glyph and its outline occupy space in the atlas separately?
<TextBlock
            Text="qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890"
            FontSize="35.2"
            FontFamily="{StaticResource Font.Montserrat}"
            FontWeight="Bold"
            Foreground="Red"
            Stroke="#FFFDFDFD"
            StrokeThickness="1"/>
Attachments
Screenshot 2026-05-04 122637.png
Screenshot 2026-05-04 122637.png (35.57 KiB) Viewed 24505 times
 
User avatar
jsantos
Site Admin
Posts: 4823
Joined: 20 Jan 2012, 17:18
Contact:

Re: Glyph does not fit in atlas

05 May 2026, 12:07

Is it possible to force reset the atlas?
There is internal functionality for that, but we prefer not exposing it, as the system should work without manual intervention.
And is it normal that if a **Stroke** is applied to text, the glyph and its outline occupy space in the atlas separately?
Yes, this is expected.

Who is online

Users browsing this forum: No registered users and 4 guests