Fix for issue #418
This commit is contained in:
parent
c7195a4450
commit
59c4ba0fb9
25
fonts.js
25
fonts.js
@ -2208,21 +2208,28 @@ var Type2CFF = (function() {
|
||||
|
||||
var charstrings = [];
|
||||
var differences = properties.differences;
|
||||
var index = 0;
|
||||
var index = 0, code = 0;
|
||||
var kCmapGlyphOffset = 0xE000;
|
||||
for (var i = 1; i < charsets.length; i++) {
|
||||
var glyph = charsets[i];
|
||||
for (var j = index; j < differences.length; j++) {
|
||||
if (differences[j]) {
|
||||
index = j;
|
||||
break;
|
||||
if (differences.length) {
|
||||
for (var j = index; j < differences.length; j++) {
|
||||
if (differences[j]) {
|
||||
index = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
code = differences.indexOf(glyph);
|
||||
if (code == -1)
|
||||
code = properties.glyphs[glyph] || index;
|
||||
} else {
|
||||
code = GlyphsUnicode[glyph] || index;
|
||||
index = code;
|
||||
}
|
||||
|
||||
var code = differences.indexOf(glyph);
|
||||
if (code == -1)
|
||||
code = properties.glyphs[glyph] || index;
|
||||
|
||||
if (!code)
|
||||
continue;
|
||||
var width = widths[code] || defaultWidth;
|
||||
properties.encoding[index] = index + kCmapGlyphOffset;
|
||||
charstrings.push({unicode: code + kCmapGlyphOffset, width: width, gid: i});
|
||||
|
Loading…
Reference in New Issue
Block a user