sunflowerdeath / webfonts-generator

Generator of webfonts from svg icons
The Unlicense
271 stars 152 forks source link

Icon resizing/centering within a boundary #39

Open webdevan opened 6 years ago

webdevan commented 6 years ago

I guess this is a feature request.

My icons are different sizes. Some icons are square-shaped, some are tall, and some are wide. The font generator appears to standardize the icons based on height to all be of equal height but variable in width. It would be nice to have the ability to define a boundary (width:height ratio - eg a 1:1 square) and for all icons to be centered within the boundaries so that no icon is wider than all the others. A really wide icon would just appear smaller and vertically centered within the boundary.

Is this be feasible?

image

mark-spurgeon commented 5 years ago

wouldn't you be able to do that with a flex div?

webdevan commented 5 years ago

Perhaps but ideally an icon font makes it dead easy to use icons interchangeably. My work around was to just add font-size: 80% or similar to specific icon clases.