tancredi/fantasticon

Centering icons vertically inside font

harun911 opened this issue · 3 comments

I'm opening a new issue, so this gets noticed.

I also run into issues with the icons not being centered vertically. Using descent is not an option in my case, because the icons are all varying in height and width. So, I can not use a single value to correct the offset.

Here you can clearly see the problem:
image

Here is another screenshot of the icons.html, where you see the difference in alignment.
image

Is it possible to somehow vertically align them inside the font? All the fixes mentioned in the other issue about vertical centering unfortunately did not work for me.

Are there any updates on this issue?

Same here? Were you able to solve the problem somehow?

anh4n commented

Try adding the following code into the .fantasticonrc. These options are then passed directly to svgicons2svgfont which has options for centering. For me it solved the problem.

formatOptions: {
    svg: {
        centerHorizontally: true,
        centerVertically: true
    }
}