GuangchuangYu / emojifont

:lollipop:Emoji and fontawesom in both base and ggplot2 graphics
https://guangchuangyu.github.io/emojifont/
67 stars 22 forks source link

Unable to replicate the example #23

Closed meensrinivasan closed 2 years ago

meensrinivasan commented 5 years ago

Hello,

When I try to replicate this example

set.seed(2016-03-09)
fa <- fontawesome(c('fa-github', 'fa-weibo', 'fa-twitter', 'fa-android', 'fa-coffee'))
d <- data.frame(x=rnorm(20),
                y=rnorm(20),
                label=sample(fa, 20, replace=T))

ggplot(d, aes(x, y, color=label, label=label)) +
    geom_text(family='fontawesome-webfont', size=6)+
    xlab(NULL)+ylab(NULL) +
    theme(legend.text=element_text(family='fontawesome-webfont'))

I get the following figure

image

I have downloaded fontawesome from here https://fontawesome.com/download

I also used

extrafont::font_import()
extrafont::loadfonts(device = "win")

Please can you help? Thank you so much! :)

GuangchuangYu commented 5 years ago

rstudio issue?

monkeywithacupcake commented 3 years ago

I am using RStudio, and I am able to reproduce the example