diff --git a/resources/fonts/NotoSansKR-Bold.ttf b/resources/fonts/NotoSansKR-Bold.ttf deleted file mode 100644 index 6cf639eb7d..0000000000 Binary files a/resources/fonts/NotoSansKR-Bold.ttf and /dev/null differ diff --git a/resources/fonts/NotoSansKR-Regular.ttf b/resources/fonts/NotoSansKR-Regular.ttf deleted file mode 100644 index 1b14d32473..0000000000 Binary files a/resources/fonts/NotoSansKR-Regular.ttf and /dev/null differ diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index fea594abaf..8753daa30b 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -371,7 +371,6 @@ void ImGuiWrapper::set_language(const std::string &language) } else if (lang == "ko") { ranges = ImGui::GetIO().Fonts->GetGlyphRangesKorean(); // Default + Korean characters m_font_cjk = true; - m_is_korean = true; } else if (lang == "zh") { ranges = (language == "zh_TW") ? // Traditional Chinese @@ -2091,10 +2090,7 @@ void ImGuiWrapper::init_font(bool compress) cfg.OversampleH = cfg.OversampleV = 1; //FIXME replace with io.Fonts->AddFontFromMemoryTTF(buf_decompressed_data, (int)buf_decompressed_size, m_font_size, nullptr, ranges.Data); //https://github.com/ocornut/imgui/issues/220 - if (m_is_korean) - default_font = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + "NotoSansKR-Regular.ttf").c_str(), m_font_size, &cfg, ranges.Data); - else - default_font = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + "HarmonyOS_Sans_SC_Regular.ttf").c_str(), m_font_size, &cfg, ranges.Data); + default_font = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + "HarmonyOS_Sans_SC_Regular.ttf").c_str(), m_font_size, &cfg, m_font_cjk ? ImGui::GetIO().Fonts->GetGlyphRangesChineseFull() : ranges.Data); if (default_font == nullptr) { default_font = io.Fonts->AddFontDefault(); if (default_font == nullptr) { @@ -2102,10 +2098,7 @@ void ImGuiWrapper::init_font(bool compress) } } - if (m_is_korean) - bold_font = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + "NotoSansKR-Bold.ttf").c_str(), m_font_size, &cfg, ranges.Data); - else - bold_font = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + "HarmonyOS_Sans_SC_Bold.ttf").c_str(), m_font_size, &cfg, ranges.Data); + bold_font = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + "HarmonyOS_Sans_SC_Bold.ttf").c_str(), m_font_size, &cfg, ranges.Data); if (bold_font == nullptr) { bold_font = io.Fonts->AddFontDefault(); if (bold_font == nullptr) { throw Slic3r::RuntimeError("ImGui: Could not load deafult font"); } diff --git a/src/slic3r/GUI/ImGuiWrapper.hpp b/src/slic3r/GUI/ImGuiWrapper.hpp index b8840ffe04..052ea00e5e 100644 --- a/src/slic3r/GUI/ImGuiWrapper.hpp +++ b/src/slic3r/GUI/ImGuiWrapper.hpp @@ -48,7 +48,6 @@ class ImGuiWrapper const ImWchar* m_glyph_basic_ranges { nullptr }; // Chinese, Japanese, Korean bool m_font_cjk{ false }; - bool m_is_korean{ false }; float m_font_size{ 18.0 }; unsigned m_font_texture{ 0 }; unsigned m_font_another_texture{ 0 };