Skip to content

Commit

Permalink
Fix font embedding on pdfkit 2.x
Browse files Browse the repository at this point in the history
Big props to @florianbepunkt for spotting this solution.
See #2924 (comment)
  • Loading branch information
klimeryk committed Nov 3, 2024
1 parent 22dd565 commit 16f1475
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pdfkit/src/font/embedded.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 16f1475

Please sign in to comment.