| Crates.io | fontawesome-free-pack |
| lib.rs | fontawesome-free-pack |
| version | 7.0.1 |
| created_at | 2025-09-01 12:33:26.574476+00 |
| updated_at | 2025-09-04 13:18:57.294642+00 |
| description | A redistribution of @fortawesome/fontawesome-free npm package's SVG and metadata. |
| homepage | |
| repository | https://github.com/2bndy5/redist-icons |
| max_upload_size | |
| id | 1819547 |
| size | 2,486,271 |
A redistribution of SVG assets and some metadata from the
@fortawesome/fontawesome-free npm package.
The SVG data is embedded as strings after it is optimized with SVGO. This
package is intended to easily inject SVG data into HTML documents. Thus, we have
stripped any width and height fields from the <svg> element, while
retaining any viewBox field in the <svg> element.
All icons are instantiated as constants using the Icon data structure.
There is a convenient get_icon() function to fetch an icon using it's slug name.
Note the family of icon is expected to prefix the slug like a relative path:
<family>/<slug>
from fontawesome_free_pack import get_icon, BRANDS_GITHUB
fetched = get_icon("brands/github")
assert fetched is not None
assert BRANDS_GITHUB.svg == fetched.svg
use fontawesome_free_pack::{get_icon, BRANDS_GITHUB};
assert_eq!(BRANDS_GITHUB.svg, get_icon("brands/github").unwrap().svg);
This crate has the following features:
brands: Includes all icons under the fontawesome brands family.solid: Includes all icons under the fontawesome solid family.regular: Includes all icons under the fontawesome regular family.All the above features are enabled by default.
The python binding does not support conditionally compiling certain icon families.