From 2be58ca79d5fe59c74ff7b38d9455149cd286cc5 Mon Sep 17 00:00:00 2001 From: Pedro Sland Date: Tue, 2 Dec 2025 23:23:21 +0000 Subject: [PATCH] Fix unreadable overlay elements in 3D view on XWayland/Intel - closes #10287 --- src/slic3r/GUI/ImGuiWrapper.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index a0cdc558b2..36150fa9f8 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -2720,6 +2720,10 @@ void ImGuiWrapper::init_font(bool compress) builder.BuildRanges(&ranges); // Build the final result (ordered ranges with all the unique characters submitted) io.Fonts->Flags |= ImFontAtlasFlags_NoPowerOfTwoHeight; + // Limit texture height to avoid exceeding GL_MAX_TEXTURE_SIZE + // Make the atlas wider to keep it shorter (height limit might be 16384 on XWayland) + io.Fonts->TexDesiredWidth = 8192; + ImFontConfig cfg = ImFontConfig(); cfg.OversampleH = cfg.OversampleV = 1; //FIXME replace with io.Fonts->AddFontFromMemoryTTF(buf_decompressed_data, (int)buf_decompressed_size, m_font_size, nullptr, ranges.Data);