From 4ec931853e1078c2ab9868098134a6445f4cd3e9 Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 13 Feb 2018 21:01:56 +0100 Subject: [PATCH] Demo: Fonts; Added Font Offset. --- imgui_demo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index ec9fc08e..2a197278 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -2205,6 +2205,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) ImGui::Text("The quick brown fox jumps over the lazy dog"); ImGui::PopFont(); ImGui::DragFloat("Font scale", &font->Scale, 0.005f, 0.3f, 2.0f, "%.1f"); // Scale only this font + ImGui::InputFloat("Font offset", &font->DisplayOffset.y, 1, 1, 0); ImGui::SameLine(); ShowHelpMarker("Note than the default embedded font is NOT meant to be scaled.\n\nFont are currently rendered into bitmaps at a given size at the time of building the atlas. You may oversample them to get some flexibility with scaling. You can also render at multiple sizes and select which one to use at runtime.\n\n(Glimmer of hope: the atlas system should hopefully be rewritten in the future to make scaling more natural and automatic.)"); ImGui::Text("Ascent: %f, Descent: %f, Height: %f", font->Ascent, font->Descent, font->Ascent - font->Descent); ImGui::Text("Fallback character: '%c' (%d)", font->FallbackChar, font->FallbackChar);