Last Updated: September 09, 2019
· honzacz

Using Font Awesome with (Xe)LaTeX

Font Awesome is a free (CC-BY-3.0) icon font from GitHub, that contains several different icons for various purposes. It is designed for web usage, and thus all the characters are defined in the private unicode range to avoid confusing screen readers.

I wanted to use some of the glyphs in my resumé in (Xe)LaTeX, however, due to the implementation it is not really easy to access them directly. To be able to include the individual glyphs in a document I created a translation table (, which defines each icon/glyph using its number, such as:


The codes are taken from the FontAwesome LESS/CSS file, and the names of the individual icons are preserved, only prefixed with fa and camel-cased to conform with LaTeX conventions.

The usage is simple, and it requires XeLaTeX to be used as compiler and the font to be installed as a system font.

  1. Save the file from the gist into your project folder as fontawesome.sty
  2. Put \usepackage{fontawesome} into the preamble
  3. Define the font command for FontAwesome: \newfontfamily{\FA}{FontAwesome Regular}. This step requires fontspec and XeLaTeX, as regular LaTeX does not support direct usage of TTF/OTF system fonts.
  4. Redefine required characters (optional): \def\twitter{{\FA \faTwitter}}
  5. Use: \href{}{\twitter\ swaycz}

The outcome looks like this:


I think I might rewrite the gist into a full package, but that depends on my future needs as well...

(Btw. it would be cool if the CSS for coderwall would be fixed for inline code using ``)