Useful comments.

This commit is contained in:
Anthony Kim
2026-07-13 11:23:39 -07:00
parent 06ce754fcc
commit 2ae6e3a603
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -376,6 +376,7 @@ export class GlyphRenderer extends Disposable {
// Bind the atlas page texture if they have changed. AtlasPage.version is globally
// monotonic, so a page object swap at the same index (which happens after a page merge)
// is detected by the same comparison.
// Clamp defensively in case the atlas unexpectedly exceeds texture capacity.
const pageCount = Math.min(this._atlas.pages.length, this._atlasTextures.length);
if (this._atlas.pages.length > this._atlasTextures.length && !this._pageOverflowWarned) {
this._pageOverflowWarned = true;