nfroidure / svgicons2svgfont

Concatenate SVG icons and ouput an SVG font
http://nfroidure.github.io/svgiconfont/
MIT License
337 stars 71 forks source link

Normalize adds extra height to wide icon since 10.0.5 #152

Closed thybzi closed 1 year ago

thybzi commented 2 years ago

Issue

I'm a gentledev i:

Expected behavior

wide glyph height based on content height

Actual behavior

wide glyph height based on content width (empty vertical space above icon content)

Steps to reproduce the behavior

  1. Use the following source svg:
    <svg width="32" height="12" viewBox="0 0 32 12" xmlns="http://www.w3.org/2000/svg">
    <path d="m1.64861,0l14.35139,9.01l14.35139,-9.01l1.64861,2.42447l-14.62616,9.1825c-0.8347,0.52404 -1.91298,0.52404 -2.74768,0l-14.62616,-9.1825l1.64861,-2.42447z"/>
    </svg>

  2. convert with normalize: true

Possibly broken in #137, works perfectly up to version 10.0.4, broken in 10.0.5

Debugging informations

Feature request

Feature description

Use cases

Magiczne commented 2 years ago

@nfroidure the change implemented in https://github.com/nfroidure/svgicons2svgfont/pull/137 was indeed a breaking change as it changes the icon height, not actually preserving aspect ratio.

Will it be fixed?

darylteo commented 1 year ago

This issue seems to have been fixed somehow in 12.0.0 as listed here https://www.npmjs.com/package/svgicons2svgfont?activeTab=versions

But this doesn't seem to be an official release?

Forcing this specific module to 10.0.4 or 12.0.0 with npm overrides worksaround this issue.