Skip to content

Commit

Permalink
Merge pull request #137 from ramirezcgn/master
Browse files Browse the repository at this point in the history
Fix normalize option with wide icons
  • Loading branch information
pioug authored Sep 19, 2021
2 parents eb26c81 + 54dd0e6 commit be4d9ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ class SVGIcons2SVGFontStream extends Transform {

this.glyphs.forEach((glyph) => {
const ratio = this._options.normalize
? fontHeight / glyph.height
? fontHeight / (glyph.width > glyph.height ? glyph.width : glyph.height)
: fontHeight / maxGlyphHeight;
if (!isFinite(ratio)) throw new Error('foo');
glyph.width *= ratio;
Expand Down
4 changes: 2 additions & 2 deletions tests/expected/variableheighticonsn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions tests/results/variableheighticonsn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit be4d9ba

Please sign in to comment.