Skip to content

Commit 99c8119

Browse files
committed
Fix font embedding on pdfkit 2.x
Big props to @florianbepunkt for spotting this solution. See #2924 (comment)
1 parent 858c779 commit 99c8119

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/pdfkit/src/font/embedded.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ const createEmbeddedFont = (PDFFont) =>
149149
fontFile.data.Subtype = 'CIDFontType0C';
150150
}
151151

152-
fontFile.end(this.subset.encode());
152+
fontFile.end(Buffer.from(this.subset.encode()));
153153

154154
const familyClass =
155155
((this.font['OS/2'] != null

0 commit comments

Comments
 (0)