Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centering icons vertically inside font #375

Open
harun911 opened this issue Apr 11, 2022 · 3 comments
Open

Centering icons vertically inside font #375

harun911 opened this issue Apr 11, 2022 · 3 comments

Comments

@harun911
Copy link

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.

@gnvcor
Copy link

gnvcor commented Sep 4, 2022

Are there any updates on this issue?

@skaragoez
Copy link

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

@anh4n
Copy link

anh4n commented Jan 12, 2023

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
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants