Glyph contours can be null while consolidating fonts

This commit is contained in:
Antonin Stefanutti 2017-11-21 10:23:30 +01:00
parent 9a26febbf2
commit c8cb03f1c3

View File

@ -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) {