We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 874ba23 + aa44587 commit 7e48938Copy full SHA for 7e48938
1 file changed
src/core/fonts.js
@@ -2255,15 +2255,11 @@ class Font {
2255
if (!valid) {
2256
break;
2257
}
2258
- const customNames = [],
2259
- strBuf = [];
+ const customNames = [];
2260
while (font.pos < end) {
2261
- const stringLength = font.getByte();
2262
- strBuf.length = stringLength;
2263
- for (i = 0; i < stringLength; ++i) {
2264
- strBuf[i] = String.fromCharCode(font.getByte());
2265
- }
2266
- customNames.push(strBuf.join(""));
+ const strLen = font.getByte(),
+ str = font.getString(strLen);
+ customNames.push(str);
2267
2268
glyphNames = [];
2269
for (i = 0; i < numGlyphs; ++i) {
0 commit comments