mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-08 17:29:03 +08:00
Fix garbled text when display scalling > 300%
On Windows, if your display scaling is greater than 300%, the text rendered by imgui will be garbled. Allowing imgui to do the scaling instead of making the font to large corrects the issue.
This commit is contained in:
parent
7ce38201c8
commit
a77847c2ad
@ -6428,7 +6428,7 @@ void GLCanvas3D::_resize(unsigned int w, unsigned int h)
|
||||
m_last_w = w;
|
||||
m_last_h = h;
|
||||
|
||||
const float font_size = 1.5f * wxGetApp().em_unit();
|
||||
const float font_size = 1.0f * wxGetApp().em_unit();
|
||||
#if ENABLE_RETINA_GL
|
||||
imgui->set_scaling(font_size, 1.0f, m_retina_helper->get_scale_factor());
|
||||
#else
|
||||
|
@ -2110,6 +2110,7 @@ void ImGuiWrapper::init_font(bool compress)
|
||||
throw Slic3r::RuntimeError("ImGui: Could not load deafult font");
|
||||
}
|
||||
}
|
||||
default_font->Scale = 1.5f;
|
||||
|
||||
if (m_is_korean)
|
||||
bold_font = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + "NotoSansKR-Bold.ttf").c_str(), m_font_size, &cfg, ranges.Data);
|
||||
@ -2119,6 +2120,7 @@ void ImGuiWrapper::init_font(bool compress)
|
||||
bold_font = io.Fonts->AddFontDefault();
|
||||
if (bold_font == nullptr) { throw Slic3r::RuntimeError("ImGui: Could not load deafult font"); }
|
||||
}
|
||||
bold_font->Scale = 1.5f;
|
||||
|
||||
#ifdef __APPLE__
|
||||
ImFontConfig config;
|
||||
|
Loading…
x
Reference in New Issue
Block a user