rmarkdown icon indicating copy to clipboard operation
rmarkdown copied to clipboard

Update Fontawesome font

Open giadasp opened this issue 4 years ago • 7 comments

Dear developers, can you please update the font of FontAwesome at the latest release? Most of the icons are missing in the version you included in the package. Thank you very much

Giada

giadasp avatar Oct 02 '19 13:10 giadasp

Hi... I am still having problem icon = "fas fa-skull-crossbones" or "fas fa-heart-broken" please advise.

msgoussi avatar Mar 18 '21 09:03 msgoussi

These icons may not be in the version of fontawesome included in rmarkdown directly. You can use the new fontawesome package: https://github.com/rstudio/fontawesome which is on CRAN.

fontawesome::fa("fas fa-skull-crossbones")
fontawesome::fa("fas fa-heart-broken")

It is very recent but it should work and it has a recent version of fontawesome lib. µ

I think rmarkdown should use it in the future and fontawesome library version will be upgraded there.

cderv avatar Mar 18 '21 11:03 cderv

I have tried in flexdashboard::valueBox() and it is not showing the heart broken. Please advise, I might did something wrong

msgoussi avatar Mar 18 '21 15:03 msgoussi

You did not mention you were using flexdashboard - please give the full detail when you are seeking for help. Currently, you can't use new icon name in flexdashboard::valueBox() with default font awesome library included. You already asked in https://github.com/rstudio/flexdashboard/issues/296 and the answer was to wait for an update of the dependency. If the issue is not closed, then it means we have not yet fix that.

If you can't wait, you need to use a trick that the new fontawesome 📦 allow. You need to load the newer fontawesome dependency that should contain your icon name before using the icon name in the valueBox()

try

To set in the document 
```{r, include= TRUE}
htmltools::tagList(fontawesome::fa_html_dependency())
```

Use new icon name afterthat.
```{r}
flexdashboard::valueBox(42, caption = "Errors", icon="fas fa-skull-crossbones")
```

cderv avatar Mar 18 '21 16:03 cderv

You did not mention you were using flexdashboard - please give the full detail when you are seeking for help. I am totally sorry.

msgoussi avatar Mar 18 '21 17:03 msgoussi

FWIW we'll probably make a switch to use the fontawesome package in rmarkdown for the coming versions

cderv avatar Jan 11 '22 11:01 cderv

You did not mention you were using flexdashboard - please give the full detail when you are seeking for help. Currently, you can't use new icon name in flexdashboard::valueBox() with default font awesome library included. You already asked in rstudio/flexdashboard#296 and the answer was to wait for an update of the dependency. If the issue is not closed, then it means we have not yet fix that.

If you can't wait, you need to use a trick that the new fontawesome 📦 allow. You need to load the newer fontawesome dependency that should contain your icon name before using the icon name in the valueBox()

try

To set in the document 
```{r, include= TRUE}
htmltools::tagList(fontawesome::fa_html_dependency())

Use new icon name afterthat.

flexdashboard::valueBox(42, caption = "Errors", icon="fas fa-skull-crossbones")

I just wanted to say thank you. I have spent two whole work days looking how to update the fontawesome package.

KrishanBhakta avatar Aug 16 '22 21:08 KrishanBhakta