From 620bfc013cd5feacab096cad75c240ce443a89f8 Mon Sep 17 00:00:00 2001 From: Timothy Schoen Date: Tue, 10 Feb 2026 11:52:51 +0100 Subject: [PATCH 1/3] Try to fix blurry pdlua rendering --- Source/Objects/LuaObject.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Objects/LuaObject.h b/Source/Objects/LuaObject.h index b56eed551..3011544c9 100644 --- a/Source/Objects/LuaObject.h +++ b/Source/Objects/LuaObject.h @@ -235,8 +235,14 @@ class LuaObject final : public ObjectBase void render(NVGcontext* nvg) override { + NVGScopedState scopedState(nvg); + + auto scale = nvgCurrentPixelScale(nvg) * getValue(zoomScale); + nvgScale(nvg, 1.0f / scale, 1.0f / scale); + nvgTransformQuantize(nvg); + for (auto& [layer, fb] : framebuffers) { - fb.render(nvg, Rectangle(getWidth() + 1, getHeight())); + fb.render(nvg, Rectangle(std::ceil(getWidth() * scale), std::ceil(getHeight() * scale))); } } From 1052c2380ba12e8ae7fc1257218ad2f66862d1d9 Mon Sep 17 00:00:00 2001 From: Timothy Schoen Date: Tue, 10 Feb 2026 17:56:51 +0100 Subject: [PATCH 2/3] Improve nanovg text rendering --- Libraries/nanovg | 2 +- Source/NVGSurface.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Libraries/nanovg b/Libraries/nanovg index 00fdfc976..f444a5a5f 160000 --- a/Libraries/nanovg +++ b/Libraries/nanovg @@ -1 +1 @@ -Subproject commit 00fdfc97665db5acdd9c859e02a6b792761d88c8 +Subproject commit f444a5a5f878696ad72b5017e72f342f2a110a48 diff --git a/Source/NVGSurface.cpp b/Source/NVGSurface.cpp index ee6d2709d..01eec4c60 100644 --- a/Source/NVGSurface.cpp +++ b/Source/NVGSurface.cpp @@ -127,7 +127,7 @@ void NVGSurface::initialise() setVisible(true); lastRenderScale = calculateRenderScale(); - nvg = nvgCreateContext(view, NVG_ANTIALIAS | NVG_TRIPLE_BUFFER, getWidth() * lastRenderScale, getHeight() * lastRenderScale); + nvg = nvgCreateContext(view, NVG_TRIPLE_BUFFER, getWidth() * lastRenderScale, getHeight() * lastRenderScale); #else setVisible(true); glContext->attachTo(*this); @@ -155,6 +155,8 @@ void NVGSurface::initialise() updateWindowContextVisibility(); surfaces[nvg] = this; + + nvgAtlasTextThreshold(nvg, 48.0f); nvgCreateFontMem(nvg, "Inter", (unsigned char*)BinaryData::InterRegular_ttf, BinaryData::InterRegular_ttfSize, 0); nvgCreateFontMem(nvg, "Inter-Regular", (unsigned char*)BinaryData::InterRegular_ttf, BinaryData::InterRegular_ttfSize, 0); nvgCreateFontMem(nvg, "Inter-Bold", (unsigned char*)BinaryData::InterBold_ttf, BinaryData::InterBold_ttfSize, 0); From b8b53790bbe51e348015237fc1ae91bdeaad101b Mon Sep 17 00:00:00 2001 From: Timothy Schoen Date: Tue, 10 Feb 2026 18:08:51 +0100 Subject: [PATCH 3/3] Small pdlua fixes --- Libraries/pd-lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/pd-lua b/Libraries/pd-lua index 2bd1efb69..e987fafd5 160000 --- a/Libraries/pd-lua +++ b/Libraries/pd-lua @@ -1 +1 @@ -Subproject commit 2bd1efb69532cca3dc7a7e2b465adf4e8ce2c695 +Subproject commit e987fafd5ad2f87a4f3c606cc43cc3960543b61f