Skip to content

Raylib Gum Runtime should not spam font loading in the log #1947

@profexorgeek

Description

@profexorgeek

When creating a list box in my project, Gum seems to be trying to load the font again for every single list item. I think this should not happen and I also think exceptions are happening, possibly because it's trying to open the same file too many times.

The setup for this is complex enough that you'll probably want to use my project. Depending on when you attempt to repro and what I've changed, the steps should be something like this:

  1. Run Airpig, you should see an editor screen
  2. Click the hamburger menu in the top right
  3. Click "Load Project" to bring up the file chooser
  4. This will enumerate your MyDocuments folder in a listbox (by default)
  5. Observe the debug output
  6. You should logs similar to the below

This is the debug output:

WARNING: FILEIO: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache\Font14Segoe_UI.fnt.ttf] Failed to open file
WARNING: FILEIO: [C:/Windows/Fonts\Segoe UI.ttf] Failed to open file
WARNING: FILEIO: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache\Font14Segoe_UI.fnt.ttf] Failed to open file
WARNING: FILEIO: [C:/Windows/Fonts\Segoe UI.ttf] Failed to open file
WARNING: FILEIO: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache\Font14Segoe_UI.fnt.ttf] Failed to open file
WARNING: FILEIO: [C:/Windows/Fonts\Segoe UI.ttf] Failed to open file
WARNING: FILEIO: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache\Font14Segoe_UI.fnt.ttf] Failed to open file
WARNING: FILEIO: [C:/Windows/Fonts\Segoe UI.ttf] Failed to open file
WARNING: FILEIO: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache\Font14Segoe_UI.fnt.ttf] Failed to open file
WARNING: FILEIO: [C:/Windows/Fonts\Segoe UI.ttf] Failed to open file
INFO: FILEIO: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache\Font14Segoe_UI_noSmooth.fnt] Text file loaded successfully
INFO: FILEIO: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache/Font14Segoe_UI_noSmooth_0.png] File loaded successfully
INFO: IMAGE: Data loaded successfully (256x256 | R8G8B8A8 | 1 mipmaps)
INFO: TEXTURE: [ID 677] Texture loaded successfully (256x256 | R8G8B8A8 | 1 mipmaps)
INFO: FONT: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache\Font14Segoe_UI_noSmooth.fnt] Font loaded successfully (191 glyphs)
INFO: FONT: Data loaded successfully (32 pixel size | 95 glyphs)
WARNING: FILEIO: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache\Font14Dogica_Pixel_noSmooth.fnt.ttf] Failed to open file
WARNING: FILEIO: [C:/Windows/Fonts\Dogica Pixel.ttf] Failed to open file
INFO: FILEIO: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache\Font8Dogica_Pixel_noSmooth.fnt] Text file loaded successfully
INFO: FILEIO: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache/Font8Dogica_Pixel_noSmooth_0.png] File loaded successfully
INFO: IMAGE: Data loaded successfully (256x256 | R8G8B8A8 | 1 mipmaps)
INFO: TEXTURE: [ID 678] Texture loaded successfully (256x256 | R8G8B8A8 | 1 mipmaps)
INFO: FONT: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache\Font8Dogica_Pixel_noSmooth.fnt] Font loaded successfully (191 glyphs)
INFO: FONT: Data loaded successfully (32 pixel size | 95 glyphs)
INFO: FILEIO: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache\Font8Dogica_Pixel_noSmooth.fnt] Text file loaded successfully
INFO: FILEIO: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache/Font8Dogica_Pixel_noSmooth_0.png] File loaded successfully
INFO: IMAGE: Data loaded successfully (256x256 | R8G8B8A8 | 1 mipmaps)
INFO: TEXTURE: [ID 679] Texture loaded successfully (256x256 | R8G8B8A8 | 1 mipmaps)
INFO: FONT: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache\Font8Dogica_Pixel_noSmooth.fnt] Font loaded successfully (191 glyphs)
INFO: FONT: Data loaded successfully (32 pixel size | 95 glyphs)
INFO: FILEIO: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache\Font8Dogica_Pixel_noSmooth.fnt] Text file loaded successfully
INFO: FILEIO: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache/Font8Dogica_Pixel_noSmooth_0.png] File loaded successfully
INFO: IMAGE: Data loaded successfully (256x256 | R8G8B8A8 | 1 mipmaps)
INFO: TEXTURE: [ID 680] Texture loaded successfully (256x256 | R8G8B8A8 | 1 mipmaps)
INFO: FONT: [C:\Users\justi\Documents\projects\Airpig\Airpig.Engine\bin\Debug\net8.0\Content\Gum\FontCache\Font8Dogica_Pixel_noSmooth.fnt] Font loaded successfully (191 glyphs)
INFO: FONT: Data loaded successfully (32 pixel size | 95 glyphs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugruntimeIssues with a specific runtime

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions