From 6f05525266b4e9c023e724c6d533c6f040a75ebd Mon Sep 17 00:00:00 2001 From: Luiz Filipe Freitas Carneiro Date: Fri, 1 Nov 2024 12:59:22 -0300 Subject: [PATCH] Handle possible undefined anchors --- src/opentype/GPOSProcessor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/opentype/GPOSProcessor.js b/src/opentype/GPOSProcessor.js index 6a2c1f9f..6047b441 100644 --- a/src/opentype/GPOSProcessor.js +++ b/src/opentype/GPOSProcessor.js @@ -285,6 +285,9 @@ export default class GPOSProcessor extends OTProcessor { } getAnchor(anchor) { + if (anchor == null) { + return { x: 0, y: 0 }; + } // TODO: contour point, device tables let x = anchor.xCoordinate; let y = anchor.yCoordinate;