From c189737caa24c436d7fbfe45e6e6c825d2260ac9 Mon Sep 17 00:00:00 2001 From: Guillaume Meunier Date: Thu, 19 Sep 2024 21:41:04 +0200 Subject: [PATCH] Fix the desktop client when using an english locale --- client/render/imgui_impl.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/client/render/imgui_impl.cpp b/client/render/imgui_impl.cpp index b8b203bd..f71efef9 100644 --- a/client/render/imgui_impl.cpp +++ b/client/render/imgui_impl.cpp @@ -407,8 +407,6 @@ static std::vector find_font(ImFontGlyphRangesBuilder glyph_range_b throw std::runtime_error("Fontconfig could not find ANY fonts on the system?"); } - FcFontSetPrint(font_patterns); - std::vector fonts; for (int i = 0; i < font_patterns->nfont; i++) { @@ -421,7 +419,7 @@ static std::vector find_font(ImFontGlyphRangesBuilder glyph_range_b continue; bool keep_this_font = false; - for (int i = 8; i < glyph_range_builder.UsedChars.Size; ++i) + for (int i = 0; i < glyph_range_builder.UsedChars.Size; ++i) { std::uint32_t & used_chars = glyph_range_builder.UsedChars[i]; if (used_chars == 0) @@ -474,24 +472,6 @@ void imgui_context::initialize_fonts() break; } - for (int i = 0; i < glyph_range_builder.UsedChars.Size; ++i) - { - std::uint32_t used_chars = glyph_range_builder.UsedChars[i]; - - if (used_chars == 0) - continue; - - for (int j = 0; j < 32; ++j) - { - ImWchar c = i * 32 + j; - if (used_chars & (1 << j)) - { - char buf[8]; - ImTextCharToUtf8(buf, c); - } - } - } - glyph_range_builder.BuildRanges(&glyph_ranges); // Load Fonts