mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-05 20:48:46 +02:00
Added comment on using PushFont() before building the font (#232)
This commit is contained in:
@ -4274,7 +4274,7 @@ float ImGui::CalcItemWidth()
|
|||||||
static void SetCurrentFont(ImFont* font)
|
static void SetCurrentFont(ImFont* font)
|
||||||
{
|
{
|
||||||
ImGuiState& g = *GImGui;
|
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);
|
IM_ASSERT(font->Scale > 0.0f);
|
||||||
g.Font = font;
|
g.Font = font;
|
||||||
g.FontBaseSize = g.IO.FontGlobalScale * g.Font->FontSize * g.Font->Scale;
|
g.FontBaseSize = g.IO.FontGlobalScale * g.Font->FontSize * g.Font->Scale;
|
||||||
|
Reference in New Issue
Block a user