From 8b0a6f97857483c000cf011aa8fec013b5f89c2d Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue, 3 Feb 2026 05:04:03 -0800 Subject: [PATCH] Enumerate all block pattern codepoints --- .../customGlyphs/CustomGlyphDefinitions.ts | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/addons/addon-webgl/src/customGlyphs/CustomGlyphDefinitions.ts b/addons/addon-webgl/src/customGlyphs/CustomGlyphDefinitions.ts index 9998363c..75e53930 100644 --- a/addons/addon-webgl/src/customGlyphs/CustomGlyphDefinitions.ts +++ b/addons/addon-webgl/src/customGlyphs/CustomGlyphDefinitions.ts @@ -820,19 +820,26 @@ export const customGlyphDefinitions: { [index: string]: CustomGlyphCharacterDefi // #endregion }; -export const blockPatternCodepoints = new Set(); -for (const [char, definition] of Object.entries(customGlyphDefinitions)) { - if (!definition) { - continue; - } - const parts = Array.isArray(definition) ? definition : [definition]; - if (parts.some(part => part.type === CustomGlyphDefinitionType.BLOCK_PATTERN)) { - const codepoint = char.codePointAt(0); - if (codepoint !== undefined) { - blockPatternCodepoints.add(codepoint); - } - } -} +export const blockPatternCodepoints = new Set([ + // Shade characters (2591-2593) + 0x2591, + 0x2592, + 0x2593, + // Rectangular shade characters (1FB8C-1FB94) + 0x1FB8C, + 0x1FB8D, + 0x1FB8E, + 0x1FB8F, + 0x1FB90, + 0x1FB91, + 0x1FB92, + 0x1FB94, + // Triangular shade characters (1FB9C-1FB9F) + 0x1FB9C, + 0x1FB9D, + 0x1FB9E, + 0x1FB9F +]); /** * Generates a drawing function for sextant characters. Sextants are a 2x3 grid where each cell