Merge pull request #5074 from nnethercote/readPostScriptTable-join

Use Array.join to build up strings in readPostScriptTable().
This commit is contained in:
Tim van der Meij 2014-07-25 21:26:54 +02:00
commit 62e6265fb3

View File

@ -3430,13 +3430,14 @@ var Font = (function FontClosure() {
break;
}
var customNames = [];
var strBuf = [];
while (font.pos < end) {
var stringLength = font.getByte();
var string = '';
strBuf.length = stringLength;
for (i = 0; i < stringLength; ++i) {
string += String.fromCharCode(font.getByte());
strBuf[i] = String.fromCharCode(font.getByte());
}
customNames.push(string);
customNames.push(strBuf.join(''));
}
glyphNames = [];
for (i = 0; i < numGlyphs; ++i) {