Skip to content

Commit

Permalink
Fixed bug with PDF font objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Balearica committed Jan 7, 2025
1 parent a9b5ffc commit 1f5d727
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/export/writePdfFonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export function createEmbeddedFontType0(font, firstObjIndex, style = 'normal') {
const toUnicodeStr0 = createToUnicode(font);
let toUnicodeStr = `${String(firstObjIndex + 5)} 0 obj\n`;
// Add 2 to length to account for \n characters
toUnicodeStr += `<</Length ${toUnicodeStr0.length + 2}>>\nstream\n`;
toUnicodeStr += `<</Length ${toUnicodeStr0.length}>>\nstream\n`;
toUnicodeStr += toUnicodeStr0;
toUnicodeStr += '\nendstream\nendobj\n\n';

Expand Down

0 comments on commit 1f5d727

Please sign in to comment.