38 lines
1.7 KiB
Markdown
38 lines
1.7 KiB
Markdown
# FontAwesome SVG source kit
|
|
|
|
Source SVGs the bundler reads to build a per-app icon registry. Nothing here is
|
|
shipped to a browser as-is: `jsbundler` scans the app + `uikit/` for the icon
|
|
names actually referenced (`icon="chevron-down"`), pulls just those paths out of
|
|
this tree, and emits an `@appgen/faIcons` registry containing only them. Shipping
|
|
FontAwesome's `all.min.js` instead would be 41.5 MB to look icons up by string at
|
|
runtime.
|
|
|
|
Only the styles in `jsbundler`'s `faStyleDirs` are read — currently `regular/`
|
|
(`far:`) and `solid/` (`fas:`). A Sharp project would add `sharp-regular/` and
|
|
`sharp-solid/` there and drop the SVGs in alongside.
|
|
|
|
## Provenance and licence
|
|
|
|
**Font Awesome Pro 7.3.0 — Commercial License, © Fonticons, Inc.**
|
|
<https://fontawesome.com/license>
|
|
|
|
This is a **subset**, not the full kit: the ~43 icons the `uikit/` components and
|
|
the `kjol-web` example actually reference, in `regular` and `solid`. The full kit
|
|
is ~81,000 files across 17 style directories and has no business in a shared
|
|
submodule.
|
|
|
|
Because it is Pro, it is licensed — not redistributable. It lives here on the
|
|
assumption that every consumer of kjol is covered by the same commercial licence.
|
|
If kjol is ever opened up or vendored somewhere that isn't, this directory is the
|
|
thing to pull.
|
|
|
|
## Adding an icon
|
|
|
|
Drop `<name>.svg` into `regular/` and/or `solid/` from the Font Awesome download,
|
|
then reference it by bare name (`icon="name"`). A name with no matching SVG is
|
|
reported by the bundler rather than silently rendering blank.
|
|
|
|
An app with a fuller icon kit keeps it: `jsbundler` searches the app's own
|
|
`frontend/icons` **before** this directory, so an app-side icon of the same name
|
|
wins and icons absent here still resolve.
|