I downloaded the otf files from this website. My IT dept installed "Font Awesome 5 Free Regular" and I used
library(extrafont)
font_import()
loadfonts(device = "win")
I can see Font Awesome as "Font Awesome 5 Free Regular" is registered. When I tried to use it with this test code:
waffle(c(50, 30, 15, 5), rows = 5, use_glyph = "music", glyph_size = 6)
I get
Error: FontAwesome not found. Install via: https://github.com/FortAwesome/Font-Awesome/tree/master/fonts
but that link doesn't go anywhere.
I would like to use Font Awesome (or a good alternative) to make interesting waffle charts. Did I load the font incorrectly? Is there a better alternative I am missing? I have been using this article as a guide. I have also read a related question here on stackoverflow, but it did not help. I have restarted Rstudio (and the computer) several times and no luck.
Update
Still not working. I have removed and reinstalled the waffle and emojifont packages. I Still get the error code : "Error: FontAwesome not found. Install via: https://github.com/FortAwesome/Font-Awesome/tree/master/fonts"
For anyone who ends up here in 2021 and fails to get it working with extrafont
, here is an alternative approach:
fontawesome-webfont.ttf
to your work directory (or some directory you can access)waffle
, emojifont
and showtext
packages to create the chart, sample code belowinstall.packages(c("waffle", "emojifont", "showtext"))
library(waffle)
library(emojifont)
library(showtext)
font_add(family = "FontAwesome",
regular = "fontawesome-webfont.ttf")
waffle(c(5,12,18), rows = 5, use_glyph = "subway", glyph_size = 10,
title = "Subways!", legend_pos="right")
You may want to try using FontAwesome v. 4.7 I had the same issue as you but it resolved itself immediately when I installed the .ttf version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With