When i use the fontawesome command from the emojifont package I get a square not the icon i requested. I'm fairly new to R, there may be something very simple i'm missing but this has had me stuck for some time.
I'm running windows 10, R version is up to date, using RStudio. Reportedly these commands are working on a linux computer properly see previous discussion: Replace categorical values with traffic light colors
in another question the a user says to run Windows(). This made no difference, is it significant? using font awesome in ggplot
Example code
> library(emojifont)
> load.fontawesome()
> fontawesome('fa-circle')
[1] ""
> fontawesome('fa-apple')
[1] ""
> fontawesome('fa-at')
[1] ""
Update: I can reproduce some simple examples online but not others.
set.seed(123)
x <- rnorm(10)
set.seed(321)
y <- rnorm(10)
plot(x, y, cex=0)
text(x, y, labels=emoji('cow'), cex=1.5, col='steelblue', family='EmojiOne')
d <- data.frame(x=x, y=y,
label = sample(c(emoji('cow'), emoji('camel')), 10, replace=TRUE),
type = sample(LETTERS[1:3], 10, replace=TRUE))
library("ggplot2")
ggplot(d, aes(x, y, color=type, label=label)) +
geom_text(family="EmojiOne", size=6)
This works properly as you can see below

However this code only produces squares (and most other examples i have tried)
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'))
In the Image above (and most examples i have tried) I get the squares instead of Icons. Any thoughts as to why?
