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.
1.2.x
Mitchell Hashimoto 2025-10-17 14:51:30 -07:00
parent 62df12c040
commit d3128243ec
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 5 additions and 0 deletions

View File

@ -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.