Skip to content

Commit

Permalink
Added comment on using PushFont() before building the font (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Nov 29, 2015
1 parent a500c0d commit b7e1ae4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4274,7 +4274,7 @@ float ImGui::CalcItemWidth()
static void SetCurrentFont(ImFont* font)
{
ImGuiState& g = *GImGui;
IM_ASSERT(font && font->IsLoaded());
IM_ASSERT(font && font->IsLoaded()); // Font Atlas not created. Did you call io.Fonts->GetTexDataAsRGBA32 / GetTexDataAsAlpha8 ?
IM_ASSERT(font->Scale > 0.0f);
g.Font = font;
g.FontBaseSize = g.IO.FontGlobalScale * g.Font->FontSize * g.Font->Scale;
Expand Down

0 comments on commit b7e1ae4

Please sign in to comment.