Font icons are not great. SVG icons are.
Present situation: Icon packed into a font are not great.
Suggested solution: We replace the icon font with an SVG collection
This also resolves the problem of choosing arbitrary code points as seen in #657.
This also resolves the problem of choosing arbitrary code points as seen in #657.
Yes, the icon font is very tedious and lots of room for user error. I'm 100% for switching to svgs. Some thoughts on the actual implementation:
viewBox property.<span class="icon"></span>As for the @creativecommons/fonts npm package, it can continue to be a package for importing .svg files and fonts. Example usage:
import ChevronUp from '@creativecommons/fonts/svg/chevron-up.svg?inline'
We can document recommendations for webpack loaders and things like that which support svgs.
We can also make @creativecommons/fonts tree-shakeable so that only the icons that a particular site needs are present in the bundle.
I'd like to work on this issue. @dhruvkb , can you please elaborate on how this should be done?
To start with, I'd recommend pulling in a copy of Font Awesome SVGs from their site and copying over the relevant glyphs into fonts/src/assets/svg.
I'd like to work on this issue