mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 15:07:31 -06:00
Change NotoSansKR to NanumGothic for Korean font (#1957)
* Update Korean translation * 1. Fix blank button text after translation 2. Fix some mistranslated korean * -fix bottom surface in gcode viewer -update korean translation * - Fixed UI being broken 'cause "display" text size could not be calculated when cjk language is use * Change NotoSansKR to NanumGothic, which has a height similar to the main font.
This commit is contained in:
parent
9bf8cbc7de
commit
b50dfb69a2
7 changed files with 15 additions and 11 deletions
BIN
resources/fonts/NanumGothic-Bold.ttf
Normal file
BIN
resources/fonts/NanumGothic-Bold.ttf
Normal file
Binary file not shown.
BIN
resources/fonts/NanumGothic-Regular.ttf
Normal file
BIN
resources/fonts/NanumGothic-Regular.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,8 @@
|
||||||
Copyright 2012 Google Inc. All Rights Reserved.
|
Copyright (c) 2010, NHN Corporation (http://www.nhncorp.com),
|
||||||
|
with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver
|
||||||
|
NanumGothic, NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver
|
||||||
|
NanumBrush, NanumPen, Naver NanumPen.
|
||||||
|
|
||||||
|
|
||||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
This license is copied below, and is also available with a FAQ at:
|
This license is copied below, and is also available with a FAQ at:
|
||||||
|
|
|
@ -2095,8 +2095,8 @@ void ImGuiWrapper::init_font(bool compress)
|
||||||
auto font_name_regular = "HarmonyOS_Sans_SC_Regular.ttf";
|
auto font_name_regular = "HarmonyOS_Sans_SC_Regular.ttf";
|
||||||
auto font_name_bold = "HarmonyOS_Sans_SC_Bold.ttf";
|
auto font_name_bold = "HarmonyOS_Sans_SC_Bold.ttf";
|
||||||
if(m_glyph_ranges == ImGui::GetIO().Fonts->GetGlyphRangesKorean()) {
|
if(m_glyph_ranges == ImGui::GetIO().Fonts->GetGlyphRangesKorean()) {
|
||||||
font_name_regular = "NotoSansKR-Regular.otf";
|
font_name_regular = "NanumGothic-Regular.ttf";
|
||||||
font_name_bold = "NotoSansKR-Bold.otf";
|
font_name_bold = "NanumGothic-Bold.ttf";
|
||||||
}
|
}
|
||||||
default_font = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + font_name_regular).c_str(), m_font_size, &cfg, ranges.Data);
|
default_font = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + font_name_regular).c_str(), m_font_size, &cfg, ranges.Data);
|
||||||
if (default_font == nullptr) {
|
if (default_font == nullptr) {
|
||||||
|
|
|
@ -16,7 +16,7 @@ wxFont Label::sysFont(int size, bool bold)
|
||||||
|
|
||||||
// Check if the current locale is Korean
|
// Check if the current locale is Korean
|
||||||
if (wxLocale::GetSystemLanguage() == wxLANGUAGE_KOREAN) {
|
if (wxLocale::GetSystemLanguage() == wxLANGUAGE_KOREAN) {
|
||||||
face = "Noto Sans KR";
|
face = "NanumGothic";
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont font{size, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, bold ? wxFONTWEIGHT_BOLD : wxFONTWEIGHT_NORMAL, false, face};
|
wxFont font{size, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, bold ? wxFONTWEIGHT_BOLD : wxFONTWEIGHT_NORMAL, false, face};
|
||||||
|
@ -65,15 +65,15 @@ void Label::initSysFont()
|
||||||
result = wxFont::AddPrivateFont(font_path);
|
result = wxFont::AddPrivateFont(font_path);
|
||||||
// BOOST_LOG_TRIVIAL(info) << boost::format("add font of HarmonyOS_Sans_SC_Regular returns %1%")%result;
|
// BOOST_LOG_TRIVIAL(info) << boost::format("add font of HarmonyOS_Sans_SC_Regular returns %1%")%result;
|
||||||
printf("add font of HarmonyOS_Sans_SC_Regular returns %d\n", result);
|
printf("add font of HarmonyOS_Sans_SC_Regular returns %d\n", result);
|
||||||
// Adding Noto Sans KR Regular and Bold
|
// Adding NanumGothic Regular and Bold
|
||||||
font_path = wxString::FromUTF8(resource_path + "/fonts/NotoSansKR-Regular.otf");
|
font_path = wxString::FromUTF8(resource_path + "/fonts/NanumGothic-Regular.ttf");
|
||||||
result = wxFont::AddPrivateFont(font_path);
|
result = wxFont::AddPrivateFont(font_path);
|
||||||
// BOOST_LOG_TRIVIAL(info) << boost::format("add font of NotoSansKR-Regular returns %1%")%result;
|
// BOOST_LOG_TRIVIAL(info) << boost::format("add font of NanumGothic-Regular returns %1%")%result;
|
||||||
printf("add font of NotoSansKR-Regular returns %d\n", result);
|
printf("add font of NanumGothic-Regular returns %d\n", result);
|
||||||
font_path = wxString::FromUTF8(resource_path + "/fonts/NotoSansKR-Bold.otf");
|
font_path = wxString::FromUTF8(resource_path + "/fonts/NanumGothic-Bold.ttf");
|
||||||
result = wxFont::AddPrivateFont(font_path);
|
result = wxFont::AddPrivateFont(font_path);
|
||||||
// BOOST_LOG_TRIVIAL(info) << boost::format("add font of NotoSansKR-Bold returns %1%")%result;
|
// BOOST_LOG_TRIVIAL(info) << boost::format("add font of NanumGothic-Bold returns %1%")%result;
|
||||||
printf("add font of NotoSansKR-Bold returns %d\n", result);
|
printf("add font of NanumGothic-Bold returns %d\n", result);
|
||||||
#endif
|
#endif
|
||||||
Head_48 = Label::sysFont(48, true);
|
Head_48 = Label::sysFont(48, true);
|
||||||
Head_32 = Label::sysFont(32, true);
|
Head_32 = Label::sysFont(32, true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue