Bug Report
Description of the problem
A document with both embedded and standard font does not work. It creates a corrupt document. Docs with only embedded, works
Code sample
var fs = require('fs');
var PDFDocument = require('pdfkit');
var doc = new PDFDocument();
doc.registerFont('HelveticaCustom', './Helvetica.ttf');
doc.pipe(fs.createWriteStream('mixed-helvetica.pdf'));
// comment line below to make work
doc.text('standard')
doc.font('HelveticaCustom');
doc.text('embedded')
doc.end();
Your environment
- pdfkit version: 0.17.2
- Node version: 22
- Browser version (if applicable):
- Operating System: Windows