mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Put the string name of the glyph in the charset array.
Also, only warn once per font when missing a glyph name.
This commit is contained in:
parent
34022d2fd1
commit
7d6ab081eb
2 changed files with 11 additions and 6 deletions
|
@ -3335,14 +3335,15 @@ var Type1Font = (function Type1FontClosure() {
|
|||
cff.globalSubrIndex = new CFFIndex();
|
||||
|
||||
var count = glyphs.length;
|
||||
var charsetArray = [0];
|
||||
var charsetArray = ['.notdef'];
|
||||
var i, ii;
|
||||
for (i = 0; i < count; i++) {
|
||||
var index = CFFStandardStrings.indexOf(charstrings[i].glyphName);
|
||||
let glyphName = charstrings[i].glyphName;
|
||||
let index = CFFStandardStrings.indexOf(glyphName);
|
||||
if (index === -1) {
|
||||
index = strings.add(charstrings[i].glyphName);
|
||||
strings.add(glyphName);
|
||||
}
|
||||
charsetArray.push(index);
|
||||
charsetArray.push(glyphName);
|
||||
}
|
||||
cff.charset = new CFFCharset(false, 0, charsetArray);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue