This repo houses the ability to map FontAwesome font variants to a respective TeX binding.
This was built to run on a Linux-based OS. Feel free to submit a PR for Windows + OSx support.
This ONLY supports FontAwesome releases 5.0 and up.
Now supporting FontAwesome 5 Pro!*
Binding | Supported | Reason |
---|---|---|
Xelatex | Yes | - |
Lualatex | No | Need templates |
PDFLatex | No | Need templates |
Sharelatex | No | Need templates |
- I really only tested xelatex. The others might work.
Check out the Releases for pre-built FontAwesome 5.0.13 mappings.
Simply download the latest release and extract the archive.
Check out the examples directory for a pre-built PDF, .sty, and .tex.
Currently for Pro, you will need to run this script to generate Pro mappings until #11 is fixed.
See Advanced Usage below.
These mappings try to follow Font Awesome's Prefixes
You can use icons in the generated mappings with the following calls:
\faThumbsUp % generates a regular Thumbs Up
\faThumbsUpSolid % generates a solid Thumbs Up
\faThumbsUpLight % generates a light Thumbs Up (pro)
\textbf\faThumbsUp % generates a solid Thumbs Up
\textit\faThumbsUp % generates a light Thumbs Up (pro)
This utility will download a FontAwesome release zip, unzip it, locate metadata, and generate a TeX mapping using Jinja templates.
The following set of commands will create a virtualenv, run the python script, generate the pdfs, display them, then package them into a release.zip.
make env
source .env/bin/activate
make
make pdf
make display
make release
The script will automagically detect if you're using FontAwesome Free or Pro, and build the templates accordingly.
- Using a local zip archive:
python3 fontawesome-latex.py --local-file tmp/fontawesome-pro-5.0.13.zip
- Using a local extracted zip folder:
python3 fontawesome-latex.py --zipped-dir tmp/fontawesome-pro-5.0.13
- For more usage details, check out:
python3 fontawesome-latex.py --help
I wanted the most recent FontAwesome icons in my resume... 🤖
There are other tools out there, but they weren't quite as automated as one would hope.
Some of the tools even strip out many icons.
With FontAwesome 5 including metadata, it's super easy to read an icon list from the metadata file, find their respective font style (free/pro, regular/solid/light), and map them to a template.
Check out the existing issues and check out any help_wanted or enhancement tags.