From 79084c30662c5c42f4a0d8ef83a643e94bf7defb Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Wed, 24 Dec 2025 06:38:21 -0800 Subject: [PATCH] Fix sextant rendering Broke in #5483 --- .../src/customGlyphs/CustomGlyphRasterizer.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/addons/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts b/addons/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts index b533c2d7..3e0bfcae 100644 --- a/addons/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts +++ b/addons/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts @@ -426,9 +426,7 @@ function drawPathFunctionCharacter( devicePixelRatio: number, strokeWidth?: number ): void { - ctx.strokeStyle = ctx.fillStyle; ctx.beginPath(); - ctx.lineWidth = devicePixelRatio * (strokeWidth ?? 1); let actualInstructions: string; if (typeof charDefinition === 'function') { const xp = .15; @@ -454,7 +452,13 @@ function drawPathFunctionCharacter( } f(ctx, translateArgs(args, deviceCellWidth, deviceCellHeight, xOffset, yOffset, true, devicePixelRatio)); } - ctx.stroke(); + if (strokeWidth !== undefined) { + ctx.strokeStyle = ctx.fillStyle; + ctx.lineWidth = devicePixelRatio * strokeWidth; + ctx.stroke(); + } else { + ctx.fill(); + } ctx.closePath(); }