hrbrmstr/waffle

FontAwesome glyphs not rendering in Windows / RStudio Viewer

JasonAizkalns opened this issue · 1 comments

It looks like the .css is being loaded correctly and that FontAwesome is a loaded font / font family, but I am unable to get the glyphs to render. I have also tried removing the other Font Awesome* fonts from my machine, but no dice...

library(waffle)
#> Loading required package: ggplot2
library(extrafont)
#> Registering fonts with R

fonts()[grep("Awesome", fonts())]
#> [1] "Font Awesome 5 Brands" "Font Awesome 5 Free"   "FontAwesome"

waffle(c(50, 30, 15, 5), rows = 5, use_glyph = "medkit", glyph_size = 6)

devtools::session_info()
#> Session info -------------------------------------------------------------
#>  setting  value                       
#>  version  R version 3.4.4 (2018-03-15)
#>  system   x86_64, mingw32             
#>  ui       RTerm                       
#>  language (EN)                        
#>  collate  English_United States.1252  
#>  tz       America/New_York            
#>  date     2018-04-10
#> Packages -----------------------------------------------------------------
#>  package      * version    date       source                            
#>  backports      1.1.2      2017-12-13 CRAN (R 3.4.3)                    
#>  base         * 3.4.4      2018-03-15 local                             
#>  colorspace     1.3-2      2016-12-14 CRAN (R 3.4.3)                    
#>  compiler       3.4.4      2018-03-15 local                             
#>  curl           3.2        2018-03-28 CRAN (R 3.4.4)                    
#>  datasets     * 3.4.4      2018-03-15 local                             
#>  devtools       1.13.5     2018-02-18 CRAN (R 3.4.3)                    
#>  digest         0.6.15     2018-01-28 CRAN (R 3.4.3)                    
#>  evaluate       0.10.1     2017-06-24 CRAN (R 3.4.3)                    
#>  extrafont    * 0.17       2014-12-08 CRAN (R 3.4.3)                    
#>  extrafontdb    1.0        2012-06-11 CRAN (R 3.4.1)                    
#>  ggplot2      * 2.2.1.9000 2018-03-22 Github (thomasp85/ggplot2@f1ba983)
#>  graphics     * 3.4.4      2018-03-15 local                             
#>  grDevices    * 3.4.4      2018-03-15 local                             
#>  grid           3.4.4      2018-03-15 local                             
#>  gridExtra      2.3        2017-09-09 CRAN (R 3.4.3)                    
#>  gtable         0.2.0      2016-02-26 CRAN (R 3.4.3)                    
#>  htmltools      0.3.6      2017-04-28 CRAN (R 3.4.3)                    
#>  knitr          1.20       2018-02-20 CRAN (R 3.4.4)                    
#>  labeling       0.3        2014-08-23 CRAN (R 3.4.1)                    
#>  lazyeval       0.2.1      2017-10-29 CRAN (R 3.4.3)                    
#>  magrittr       1.5        2014-11-22 CRAN (R 3.4.3)                    
#>  memoise        1.1.0      2017-04-21 CRAN (R 3.4.3)                    
#>  methods      * 3.4.4      2018-03-15 local                             
#>  munsell        0.4.3      2016-02-13 CRAN (R 3.4.3)                    
#>  pillar         1.2.1      2018-02-27 CRAN (R 3.4.3)                    
#>  plyr           1.8.4      2016-06-08 CRAN (R 3.4.3)                    
#>  RColorBrewer   1.1-2      2014-12-07 CRAN (R 3.4.1)                    
#>  Rcpp           0.12.16    2018-03-13 CRAN (R 3.4.4)                    
#>  rlang          0.2.0.9001 2018-03-27 Github (tidyverse/rlang@49d7a34)  
#>  rmarkdown      1.9        2018-03-01 CRAN (R 3.4.3)                    
#>  rprojroot      1.3-2      2018-01-03 CRAN (R 3.4.3)                    
#>  Rttf2pt1       1.3.6      2018-02-22 CRAN (R 3.4.3)                    
#>  scales         0.5.0.9000 2018-03-05 Github (hadley/scales@d767915)    
#>  stats        * 3.4.4      2018-03-15 local                             
#>  stringi        1.1.6      2017-11-17 CRAN (R 3.4.2)                    
#>  stringr        1.3.0      2018-02-19 CRAN (R 3.4.3)                    
#>  tibble         1.4.2      2018-01-22 CRAN (R 3.4.3)                    
#>  tools          3.4.4      2018-03-15 local                             
#>  utils        * 3.4.4      2018-03-15 local                             
#>  waffle       * 0.9.0      2018-04-10 Github (hrbrmstr/waffle@72778f5)  
#>  withr          2.1.2      2018-03-19 Github (jimhester/withr@79d7b0d)  
#>  yaml           2.1.17     2018-02-27 CRAN (R 3.4.3)

Created on 2018-04-10 by the reprex package (v0.2.0).

Not sure if it meets your needs, but I was running into the same issue with the FontAwesome Version 5.0. It worked when I used FontAwesome Version 4.7 (installing fonts\fontawesome-webfont.ttf).