YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
22 stars 8 forks source link

Improve cryptic error message: ERROR: Font cache too small for font glyph - cache size is 1024x1024, glyph bounds are 988,864 to 1026,918 #4956

Closed BscotchSeth closed 6 months ago

BscotchSeth commented 6 months ago

Is your feature request related to a problem?

On one of our game's interfaces, Game Maker is posting this error message into the debug log:

ERROR: Font cache too small for font glyph - cache size is 1024x1024, glyph bounds are 988,864 to 1026,918

However, I cannot discern:

Also, I'm not even sure how to resolve this, because our font_texture_page_size is set to 4096x4096. So maybe the error is referring to something else? I looked through the documentation and couldn't find anything else about font caches that would make sense with regard to this error.

I thought it might be related to the font_set_cache_size() function, but that seems to only involve HTML5, and it doesn't seem to relate to texture page sizes.

Further, is this really an error? It doesn't seem to have any consequence, because everything on the interface is showing just fine. Is it actually a warning and not an error?

Describe the solution you'd like

Refine this error message to:

Describe alternatives you've considered

Alternatively, if this is not actually an error and has no consequence, just don't post it into the debug log.

Additional context

I am using SDF fonts. Not sure if that matters here!

jackerley commented 6 months ago

Could you give me some reproduction steps to see where this error is being generated?

BscotchSeth commented 6 months ago

I haven't been able to replicate it outside the Crashlands 2 project, but it appears in the console the first time the game loads into the main menu room after the initial loading sequence. You should be able to use the dev config and run the game through the IDE, and it'll be there!

jackerley commented 6 months ago

Thanks Seth, I'll check it there

jackerley commented 6 months ago

I've dug into this a bit more and it's actually a bug on our end that is generating that error. I've fixed that now so you shouldn't see this message any more (and any associated rendering issues should be fixed)

gojirra55 commented 5 months ago

I'm getting this error in the output window now, I too wish this message was less cryptic just in case it is something on my end that needs to be fixed:

image