Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Connum committed Mar 3, 2023
1 parent e79850f commit b4066a8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/tables/hmtx.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b4066a8

Please sign in to comment.