From c8cb03f1c37829da0f9a31552e760fc6d5e4b4bf Mon Sep 17 00:00:00 2001 From: Antonin Stefanutti Date: Tue, 21 Nov 2017 10:23:30 +0100 Subject: [PATCH] Glyph contours can be null while consolidating fonts --- decktape.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decktape.js b/decktape.js index e2a962d..8a319e8 100755 --- a/decktape.js +++ b/decktape.js @@ -405,7 +405,7 @@ function printSlide(printer, buffer, context) { const f = context.pdfFonts[name].font; font.data.glyf.forEach((g, i) => { if (g.contours && g.contours.length > 0) { - if (f.data.glyf[i].contours.length === 0) { + if (!f.data.glyf[i].contours || f.data.glyf[i].contours.length === 0) { f.data.glyf[i] = g; } } else if (g.compound) {