From a8d61ed534d2ea16e0fb338bc8cb376bd4358a55 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 26 Jul 2025 16:00:25 +0200 Subject: [PATCH] impr: Remove `(TrueType)` from the end of all font names on windows --- main/gui/source/window/win_window.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main/gui/source/window/win_window.cpp b/main/gui/source/window/win_window.cpp index e200af697..18d35687e 100644 --- a/main/gui/source/window/win_window.cpp +++ b/main/gui/source/window/win_window.cpp @@ -379,6 +379,11 @@ namespace hex { if (fontPath.is_relative()) fontPath = std::fs::path("C:\\Windows\\Fonts") / fontPath; + // Windows appends (TrueType) to all font names for some reason. Remove it + if (fontName.ends_with(" (TrueType)")) { + fontName = fontName.substr(0, fontName.size() - 12); + } + registerFont(fontName.c_str(), wolv::util::toUTF8String(fontPath).c_str()); }