diff --git a/packages/pdfkit/src/font/embedded.js b/packages/pdfkit/src/font/embedded.js index 1e34ec200..f9e887fdf 100644 --- a/packages/pdfkit/src/font/embedded.js +++ b/packages/pdfkit/src/font/embedded.js @@ -149,7 +149,7 @@ const createEmbeddedFont = (PDFFont) => fontFile.data.Subtype = 'CIDFontType0C'; } - fontFile.end(this.subset.encode()); + fontFile.end(Buffer.from(this.subset.encode())); const familyClass = ((this.font['OS/2'] != null