Loading font requisites

So I am trying to load a personal font using the “io.Fonts->AddFontFromFileTTF()” and my questions is what are the prerequisites to load a font, maybe multiple.

This is the error that I am getting "IM_ASSERT(io.Fonts->IsBuilt()); // Font atlas needs to be built, call renderer _NewFrame() function e.g. ImGui_ImplOpenGL3_NewFrame() " The font loads properly because it gets rendered on screen and in the next frame it shows up this error.

If you can refer me to an example I would really appreciate it :slight_smile:

its weird. are you sure the font you see is the font you try to load (imgui has a default font)?

if the font atlas is not build, so the texture maybe is set, but there is
no correspondance between letters and, cells on the texture.

so its weird if you see your font.

when you do that :

ImFont* font = io.Fonts->AddFontFromFileTTF(“font.ttf”);

if your atlas is not build, so for me font is null ? (and so you font is not loaded)

1 Like

Yes, it is a pretty unique font. also, can you expand on the “font atlas is not built” how do I make sure it is built?

Fixed it! thanks for the help @aiekick , It helped me realize where the error was :slight_smile:

1 Like