mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
Fix garbled text when display scalling > 300% (#3402)
* 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. * Only use modified scaling on Windows And only if the system's scaling factor is greater than 300%. --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
parent
a996188e38
commit
1cdd31fa99
2 changed files with 20 additions and 1 deletions
|
@ -2663,6 +2663,15 @@ void ImGuiWrapper::init_font(bool compress)
|
|||
if (bold_font == nullptr) { throw Slic3r::RuntimeError("ImGui: Could not load deafult font"); }
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
// Render the text a bit larger (see GLCanvas3D::_resize() and issue #3401), but only if the scale factor
|
||||
// for the Display is greater than 300%.
|
||||
if (wxGetApp().em_unit() > 30) {
|
||||
default_font->Scale = 1.5f;
|
||||
bold_font->Scale = 1.5f;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
ImFontConfig config;
|
||||
config.MergeMode = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue