From 295ca488ecba1e9b2dfdfb3f544f03bd55ee0881 Mon Sep 17 00:00:00 2001 From: kunxl-gg Date: Wed, 4 Sep 2024 22:44:57 +0530 Subject: [PATCH] QDENGINE: DT: Add support to icons Signed-off-by: kunxl-gg --- engines/qdengine/debugger/debugtools.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/engines/qdengine/debugger/debugtools.cpp b/engines/qdengine/debugger/debugtools.cpp index 2546dd0c3e2..2978b0a938e 100644 --- a/engines/qdengine/debugger/debugtools.cpp +++ b/engines/qdengine/debugger/debugtools.cpp @@ -115,6 +115,7 @@ static void showScore() { void onImGuiInit() { ImGuiIO &io = ImGui::GetIO(); + io.Fonts->AddFontDefault(); static const ImWchar cyrillic_ranges[] = { 0x0020, 0x00FF, // Basic Latin + Latin Supplement @@ -124,6 +125,16 @@ void onImGuiInit() { io.FontDefault = ImGui::addTTFFontFromArchive("FreeSans.ttf", 16.0f, nullptr, cyrillic_ranges);; + ImFontConfig icons_config; + icons_config.MergeMode = true; + icons_config.PixelSnapH = false; + icons_config.OversampleH = 3; + icons_config.OversampleV = 3; + icons_config.GlyphOffset = {0, 4}; + + static const ImWchar icons_ranges[] = {0xE000, 0xF8FF, 0}; + ImGui::addTTFFontFromArchive("MaterialSymbolsSharp.ttf", 16.f, &icons_config, icons_ranges); + _state = new ImGuiState(); memset(_state, 0, sizeof(ImGuiState)); }