From 86c6bf1a67a35f0dcf865179810c92690012336b Mon Sep 17 00:00:00 2001 From: Mike Kamermans Date: Wed, 30 Jan 2013 11:15:08 -0500 Subject: [PATCH] changed the type1font cff wrapping to use offsets 391,392... instead of 0,1... for pointing to strings in the String INDEX --- src/fonts.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/fonts.js b/src/fonts.js index 215105b78..b09958daf 100644 --- a/src/fonts.js +++ b/src/fonts.js @@ -5205,11 +5205,13 @@ Type1Font.prototype = { cff.names = [name]; var topDict = new CFFTopDict(); - topDict.setByName('version', 0); - topDict.setByName('Notice', 1); - topDict.setByName('FullName', 2); - topDict.setByName('FamilyName', 3); - topDict.setByName('Weight', 4); + // CFF strings IDs 0...390 are predefined names, so refering + // to entries in our own String INDEX starts at SID 391. + topDict.setByName('version', 391); + topDict.setByName('Notice', 392); + topDict.setByName('FullName', 393); + topDict.setByName('FamilyName', 394); + topDict.setByName('Weight', 395); topDict.setByName('Encoding', null); // placeholder topDict.setByName('FontMatrix', properties.fontMatrix); topDict.setByName('FontBBox', properties.bbox);