Fix symbol fonts with no file.

This commit is contained in:
Brendan Dahl 2014-02-11 13:37:12 -08:00
parent b5b94a4af3
commit f1c73edac4

View File

@ -2207,6 +2207,15 @@ var Font = (function FontClosure() {
}
this.toFontChar = map;
this.toUnicode = map;
} else if (/Symbol/i.test(fontName)) {
var symbols = Encodings.SymbolSetEncoding;
for (var charCode in symbols) {
var fontChar = GlyphsUnicode[symbols[charCode]];
if (!fontChar) {
continue;
}
this.toFontChar[charCode] = fontChar;
}
} else {
for (var charCode in this.toUnicode) {
this.toFontChar[charCode] = this.toUnicode[charCode].charCodeAt(0);