From b4066a846858ef2f9858e0d797e1958e616234d9 Mon Sep 17 00:00:00 2001 From: Connum Date: Fri, 3 Mar 2023 12:26:15 +0100 Subject: [PATCH] fix linting issues --- src/tables/hmtx.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/tables/hmtx.js b/src/tables/hmtx.js index afb3f791..836c718f 100644 --- a/src/tables/hmtx.js +++ b/src/tables/hmtx.js @@ -8,14 +8,14 @@ function parseHmtxTableAll(data, start, numMetrics, numGlyphs, glyphs) { let advanceWidth; const p = new parse.Parser(data, start); for (let i = 0; i < numMetrics; i += 1) { - advanceWidth = p.parseUShort(); // 16 bits - const leftSideBearing = p.parseShort(); // 16 bits + advanceWidth = p.parseUShort(); // 16 bits + const leftSideBearing = p.parseShort(); // 16 bits const glyph = glyphs.get(i); glyph.advanceWidth = advanceWidth; glyph.leftSideBearing = leftSideBearing; } -// If numGlyphs > numMetrics + // If numGlyphs > numMetrics for (let i = numMetrics; i < numGlyphs; i += 1) { const glyph = glyphs.get(i); glyph.advanceWidth = advanceWidth;//same as from previous loop @@ -36,8 +36,7 @@ function parseHmtxTableOnLowMemory(font, data, start, numMetrics, numGlyphs) { leftSideBearing: leftSideBearing, }; } - -// If numGlyphs > numMetrics + // If numGlyphs > numMetrics for (let i = numMetrics; i < numGlyphs; i += 1) { font._hmtxTableData[i] = { advanceWidth: advanceWidth,//same as from previous loop