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

Merging Font-Awesome-4.7.0 viewBox specifications #200

tim-janik opened this issue Jul 12, 2019 · 1 comment

Merging Font-Awesome-4.7.0 viewBox specifications #200

tim-janik opened this issue Jul 12, 2019 · 1 comment


Copy link

@tim-janik tim-janik commented Jul 12, 2019

One of my projetcs uses fontawesome fork-awesome icons via one big SVG sprite file.
Similar to the brands.svg regular.svg solid.svg files that can be found in fountawesome5.

In a nutshell, the sprite file is created with svgstore (npm package svgstore-cli) using the SVG icons as input. The sprite file can be used as follows:

<svg role="icon" aria-label="fast-forward">
  <use href="fork-awesome-sprites.svg#fast-forward"></use>

This process relies on accurate viewBox definitions however, and most of the viewBox definitions from the fontawesome icons under src/icons/svg/ are missing. Additionally, several of the svg width/height specifications seem to be off.

To create a proper sprite file, I've forked the Fork-Awesome repository and re-generated the fontawesome SVG icons. Some icons are not perfectly centered or inconsistently centered (like calendar*.svg), but none of them is clipped or out of bounds.

I intend to fix the centering issues of the fontawesome icons and then add/fix the viewBox of the fork-awesome icons as well. I wonder if any of that should be back folded into ForkAwesome/Fork-Awesome?

The diff is quite significant, especially since the fontawesome paths I could extract seem to differ from the SVG files in ForkAwesome/Fork-Awesome, mostly because the sizing is generally based on 1792x1792 pixels.

The existing viewBox definitions for Fork-Awesome icons also seem to be inconsistent (some use 1792 as height, some 1796, etc) and some are wildely off, to the extend of clipping the actual icons.

So feedback is appreciated, especially about the intended sizes / viewBox the fork-awesome icons should have.

My (local) changes live here atm:

Copy link

@xuv xuv commented Jun 10, 2020

Thank you @tim-janik Thank you for tackling this issue.
Sorry for responding so late to this post.

But if you are still interested and if you have fixed the centering issues. I’d be happy to see if we can merge your changes in our master.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants