Merge pull request #3917 from yurydelendik/issue-3857

Fixes gidStart for CID fonts
This commit is contained in:
Yury Delendik 2013-11-14 10:45:32 -08:00
commit 011ed72383

View File

@ -5611,6 +5611,9 @@ var CFFFont = (function CFFFontClosure() {
var unassignedUnicodeItems = [];
var inverseEncoding = [];
var gidStart = 0;
if (charsets[0] === '.notdef') {
gidStart = 1;
}
// According to section 9.7.4.2 CIDFontType0C glyph selection should be
// handled differently.
if (this.properties.subtype === 'CIDFontType0C') {
@ -5643,9 +5646,6 @@ var CFFFont = (function CFFFontClosure() {
inverseEncoding[gid] = charcode | 0;
}
}
if (charsets[0] === '.notdef') {
gidStart = 1;
}
}
for (var i = gidStart, ii = charsets.length; i < ii; i++) {