You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coming over from fontkit (foliojs/fontkit#23), since we determined that the issue most likely lies in pdfkit.
Using the colon character causes many of the characters to not be displayed in the resulting PDF. As soon as the colon is removed, the characters are displayed without an issue.
Below is a snippet that reproduces the issue. I used a local module to reference the fontkit branch of pdfkit.
var PDFDocument = require('../pdfkit');
var fs = require('fs');
var pdfFile = 'test.pdf';
var fontFile = 'NotoSansCJKsc-Regular.otf';
var doc = new PDFDocument({ bufferPages: true });
var pdfStream = fs.createWriteStream(pdfFile);
doc.pipe(pdfStream);
doc.fontSize(12)
.font(fontFile)
.text("This is a test: The quick brown fox jumps over the lazy dog.");
doc.end();