fix: Last character of font names being missing on Windows

This commit is contained in:
WerWolv
2025-07-30 17:43:45 +02:00
parent 6ab3353a15
commit 4c930b190e

View File

@@ -381,7 +381,7 @@ namespace hex {
// Windows appends (TrueType) to all font names for some reason. Remove it
if (fontName.ends_with(" (TrueType)")) {
fontName = fontName.substr(0, fontName.size() - 12);
fontName = fontName.substr(0, fontName.size() - 11);
}
registerFont(fontName.c_str(), wolv::util::toUTF8String(fontPath).c_str());