From d3128243ec6eb68d6cd1a7e6fde249f165fc9620 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 17 Oct 2025 14:51:30 -0700 Subject: [PATCH] renderer: force a full rebuild on any font grid change (#9252) Fixes #2731 (again) This regressed in 1.2 due to the renderer rework missing porting this. I believe this issue is still valid even with the rework since the font grid changes the atlas and if there are still cached cells that reference the old atlas coordinates it will produce garbage. --- src/renderer/generic.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/renderer/generic.zig b/src/renderer/generic.zig index 802c769a6..946f84a8a 100644 --- a/src/renderer/generic.zig +++ b/src/renderer/generic.zig @@ -1060,6 +1060,11 @@ pub fn Renderer(comptime GraphicsAPI: type) type { // Update relevant uniforms self.updateFontGridUniforms(); + + // Force a full rebuild, because cached rows may still reference + // an outdated atlas from the old grid and this can cause garbage + // to be rendered. + self.cells_viewport = null; } /// Update uniforms that are based on the font grid.