Merge pull request #492 from notmasteryet/tree-19

Fixing the CID to GID mapping for cid fonts
This commit is contained in:
Andreas Gal 2011-09-19 16:12:10 -07:00
commit 7df39bb065

View File

@ -1219,10 +1219,13 @@ var Font = (function Font() {
};
}
} else {
for (i = 0; i <= 0x1f; i++)
encoding[i].unicode += kCmapGlyphOffset;
for (i = 127; i <= 255; i++)
encoding[i].unicode += kCmapGlyphOffset;
for (i in encoding) {
if (encoding.hasOwnProperty(i)) {
var unicode = encoding[i].unicode;
if (unicode <= 0x1f || (unicode >= 127 && unicode <= 255))
encoding[i].unicode = unicode += kCmapGlyphOffset;
}
}
}
var glyphs = [];