cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Katalo Frequent Visitor
Frequent Visitor

Using FontAwesome in R script

Hello, Im trying to make a waffle chart in Power BI desktop using R, and i would like to use icons from FontAwesome. 

Im getting the following code to work in a Open R but when I use it in the R console i Power BI it gives me an error saying FontAwesome not found. 

 

Here is the code I run:

 

install.packages(c("waffle", "extrafont"))
library(waffle)
library(extrafont)
font_import(pattern = 'fontawesome-webfont')
loadfonts(device = "win")
waffle(c(50, 30, 15, 5), rows = 5, use_glyph = "user", glyph_size = 6)

Is there some other font I can use for icons or how do I get Power BI to find FontAwesome

2 REPLIES 2
Community Support Team
Community Support Team

Re: Using FontAwesome in R script

Hi @Katalo

Do you download "downloaded Font Awesome" in your server?

Here is a similar issue with solution, please check it and give me feedback if it helps.

Font Awesome in R, loaded but not found by waffle

 

Best Regards

Maggie

Katalo Frequent Visitor
Frequent Visitor

Re: Using FontAwesome in R script

I have tried the steps in that post, but still get FontAwesome not found. 

When i use this code in R open I get an image:

library(waffle)
library(extrafont)
font_import(pattern = 'fontawesome-webfont')
loadfonts(device = "win")
waffle(c(50, 30, 15, 5), rows = 5, use_glyph = "user", glyph_size = 6)

However, i have to do it in steps and after font_import i have to give R open an answer to this question:

Importing fonts may take a few minutes, depending on the number of fonts and the speed of the system.
Continue? [y/n] y

After that I can make the waffle chart and get an image with the correct icon. 

But when i use the above code in PBI R console I get an Error saying Font Awesome not found. 

 

Can I skip the font_import somehow maybe?

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 186 members 2,164 guests
Please welcome our newest community members: