mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-19 03:34:03 +02:00
Merge pull request #20799 from Snuffleupagus/readPostScriptTable-getString
Use `BaseStream.prototype.getString` in the `readPostScriptTable` function
This commit is contained in:
commit
7e48938009
@ -2255,15 +2255,11 @@ class Font {
|
||||
if (!valid) {
|
||||
break;
|
||||
}
|
||||
const customNames = [],
|
||||
strBuf = [];
|
||||
const customNames = [];
|
||||
while (font.pos < end) {
|
||||
const stringLength = font.getByte();
|
||||
strBuf.length = stringLength;
|
||||
for (i = 0; i < stringLength; ++i) {
|
||||
strBuf[i] = String.fromCharCode(font.getByte());
|
||||
}
|
||||
customNames.push(strBuf.join(""));
|
||||
const strLen = font.getByte(),
|
||||
str = font.getString(strLen);
|
||||
customNames.push(str);
|
||||
}
|
||||
glyphNames = [];
|
||||
for (i = 0; i < numGlyphs; ++i) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user