Skip to content

Loading more fonts from FontAwesome #259

Answered by razonyang
SimpleAnecdote asked this question in Q&A
Discussion options

You must be logged in to vote

Yep, we're using a custom Awesome Font icons set, defined in ./src/js/fonts.js, in order to reduce the file size of icons, because we don't need all the icons that Awesome Font provided. And it also gives users the option to choose other icons.

There are two ways to do it:

CustomJS

Since the theme using JS+SVG framework to replace all the Awesome Font to SVG, so the CustomCSS won't work. For example:

customJS = [
  "https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/js/all.min.js" # Full icons set.
  # "https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/js/solid.js" # Solid icons.
  # ...
]

You can also download the JS files and put it in the static directory…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SimpleAnecdote
Comment options

Answer selected by SimpleAnecdote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants