From 9ef5f1be840dd34c6124139f918afbf449ddecc0 Mon Sep 17 00:00:00 2001 From: Sergey Kosarevsky Date: Wed, 3 Jul 2024 19:00:11 -0700 Subject: [PATCH] HelpersImGui: allow custom size for the default font --- lvk/HelpersImGui.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lvk/HelpersImGui.cpp b/lvk/HelpersImGui.cpp index a360f766007..f3de2758e78 100644 --- a/lvk/HelpersImGui.cpp +++ b/lvk/HelpersImGui.cpp @@ -132,6 +132,8 @@ void ImGuiRenderer::updateFont(const char* defaultFontTTF, float fontSizePixels) ImFont* font = nullptr; if (defaultFontTTF) { font = io.Fonts->AddFontFromFileTTF(defaultFontTTF, cfg.SizePixels, &cfg); + } else { + font = io.Fonts->AddFontDefault(&cfg); } io.Fonts->Flags |= ImFontAtlasFlags_NoPowerOfTwoHeight;