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

Open
tim-janik opened this issue Jul 12, 2019 · 0 comments

Comments

@tim-janik
Copy link

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>
</svg>

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: https://github.com/tim-janik/Fork-Awesome/commits/master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.