2

I'm following this instruction : link

and I have this code:

library(waffle)
library(extrafont)
font_import()

# use this if things look odd in RStudio under Windows
loadfonts(device = "win")

waffle(c(50, 30, 15, 5), rows = 5, use_glyph = "fa-car", glyph_size = 40,
title = "Look I made an infographic using R!")

And I get this as result:

"Error: FontAwesome not found. Install via: https://github.com/FortAwesome/Font-Awesome/tree/master/fonts"

I also check if I Font Awesome installed or not with this code:

# check that Font Awesome is imported
fonts()[grep("Awesome", fonts())]

and I received this message: " 1 "Font Awesome 5 Brands" "Font Awesome 5 Free" "

zx8754
  • 52,746
  • 12
  • 114
  • 209
DSaad
  • 181
  • 3
  • 12
  • I've posted a solution here, using the `showtext` package: https://stackoverflow.com/a/68183288/5356704 – bencekd Jun 29 '21 at 17:35
  • 1
    After a lot of digging what worked for me is here, in case it helps: https://stackoverflow.com/a/74589250/4438465 – Juan C Nov 27 '22 at 10:38

1 Answers1

0

I don't know if this is still an issue for you or not, but it certainly was for me, and I eventually got it to work! I think there's something in the package that's set up a bit too specifically for V4 of FontAwesome. The upgrade to V5 changes some naming conventions and in doing so, I'm pretty sure it's mucked around with the package.

Easiest solution? I just had to install v4 of FontAwesome. You can find it here.

With that installed, some combination of loading the libraries emojifont and extrafont got this working for me. Good luck!

LachlanO
  • 1,152
  • 8
  • 14