mirror of https://github.com/ocornut/imgui
Internals: added FontScale storage (amend 0f63d3e
).
This commit is contained in:
parent
5496050f5f
commit
05a4f28059
|
@ -7510,7 +7510,7 @@ void ImGui::SetCurrentFont(ImFont* font)
|
|||
g.Font = font;
|
||||
g.FontBaseSize = ImMax(1.0f, g.IO.FontGlobalScale * g.Font->FontSize * g.Font->Scale);
|
||||
g.FontSize = g.CurrentWindow ? g.CurrentWindow->CalcFontSize() : 0.0f;
|
||||
g.FontScale = g.FontSize / g.FontSize;
|
||||
g.FontScale = g.FontSize / g.Font->FontSize;
|
||||
|
||||
ImFontAtlas* atlas = g.Font->ContainerAtlas;
|
||||
g.DrawListSharedData.TexUvWhitePixel = atlas->TexUvWhitePixel;
|
||||
|
|
|
@ -2267,7 +2267,7 @@ struct ImGuiContext
|
|||
Initialized = false;
|
||||
FontAtlasOwnedByContext = shared_font_atlas ? false : true;
|
||||
Font = NULL;
|
||||
FontSize = FontBaseSize = CurrentDpiScale = 0.0f;
|
||||
FontSize = FontBaseSize = FontScale = CurrentDpiScale = 0.0f;
|
||||
IO.Fonts = shared_font_atlas ? shared_font_atlas : IM_NEW(ImFontAtlas)();
|
||||
Time = 0.0f;
|
||||
FrameCount = 0;
|
||||
|
|
Loading…
Reference in New Issue