diff --git a/REUSE.toml b/REUSE.toml index 47a33e4c2..e1a266030 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -74,6 +74,12 @@ precedence = "aggregate" SPDX-FileCopyrightText = "2012 Google Inc. All Rights Reserved." SPDX-License-Identifier = "OFL-1.1" +[[annotations]] +path = "src/imgui/renderer/fonts/ProggyVector-Regular.ttf" +precedence = "aggregate" +SPDX-FileCopyrightText = "Copyright (c) 2004, 2005 Tristan Grimmer" +SPDX-License-Identifier = "MIT" + [[annotations]] path = "externals/gcn/include/**" SPDX-FileCopyrightText = "NONE" diff --git a/src/core/devtools/layer.cpp b/src/core/devtools/layer.cpp index 88115e946..7e25f1091 100644 --- a/src/core/devtools/layer.cpp +++ b/src/core/devtools/layer.cpp @@ -204,7 +204,7 @@ void L::Draw() { } if (show_advanced_debug) { - PushFont(io.Fonts->Fonts[0]); + PushFont(io.Fonts->Fonts[IMGUI_FONT_MONO]); PushID("DevtoolsLayer"); DrawAdvanced(); PopID(); diff --git a/src/imgui/imgui_std.h b/src/imgui/imgui_std.h index bbfb8cc9f..168204ea8 100644 --- a/src/imgui/imgui_std.h +++ b/src/imgui/imgui_std.h @@ -10,6 +10,9 @@ #define IM_COL32_GRAY(x) IM_COL32(x, x, x, 0xFF) +#define IMGUI_FONT_TEXT 0 +#define IMGUI_FONT_MONO 1 + namespace ImGui { namespace Easing { diff --git a/src/imgui/renderer/CMakeLists.txt b/src/imgui/renderer/CMakeLists.txt index b5f51ef62..5d74632f9 100644 --- a/src/imgui/renderer/CMakeLists.txt +++ b/src/imgui/renderer/CMakeLists.txt @@ -7,6 +7,7 @@ add_executable(Dear_ImGui_FontEmbed ${CMAKE_SOURCE_DIR}/externals/dear_imgui/mis set(FONT_LIST NotoSansJP-Regular.ttf + ProggyVector-Regular.ttf ) set(OutputList "") diff --git a/src/imgui/renderer/fonts/ProggyVector-Regular.ttf b/src/imgui/renderer/fonts/ProggyVector-Regular.ttf new file mode 100644 index 000000000..0865b6561 Binary files /dev/null and b/src/imgui/renderer/fonts/ProggyVector-Regular.ttf differ diff --git a/src/imgui/renderer/imgui_core.cpp b/src/imgui/renderer/imgui_core.cpp index da14b5934..feda54a88 100644 --- a/src/imgui/renderer/imgui_core.cpp +++ b/src/imgui/renderer/imgui_core.cpp @@ -17,6 +17,7 @@ #include "video_core/renderer_vulkan/renderer_vulkan.h" #include "imgui_fonts/notosansjp_regular.ttf.g.cpp" +#include "imgui_fonts/proggyvector_regular.ttf.g.cpp" static void CheckVkResult(const vk::Result err) { LOG_ERROR(ImGui, "Vulkan error {}", vk::to_string(err)); @@ -75,10 +76,12 @@ void Initialize(const ::Vulkan::Instance& instance, const Frontend::WindowSDL& w ImFontConfig font_cfg{}; font_cfg.OversampleH = 2; font_cfg.OversampleV = 1; - io.Fonts->AddFontDefault(); io.FontDefault = io.Fonts->AddFontFromMemoryCompressedTTF( imgui_font_notosansjp_regular_compressed_data, imgui_font_notosansjp_regular_compressed_size, 16.0f, &font_cfg, ranges.Data); + io.Fonts->AddFontFromMemoryCompressedTTF(imgui_font_proggyvector_regular_compressed_data, + imgui_font_proggyvector_regular_compressed_size, + 16.0f); StyleColorsDark();