I was trying to follow Will Chase's advice on putting the loadfonts line in the .RProfile file so I can be executed before I customarily load ggplot2. his advice
Somehow I encountered this interesting phenomenon, when I write:
if(interactive())
try(extrafont::loadfonts(device = "win"))
RStudio gave an error
Error in get(as.character(FUN), mode = "function", envir = envir) :
object 'windowsFonts' of mode 'function' was not found
Must be some behind the scene magic. once I lay my hands on the console though, I can just run extrafont::loadfonts(device = "win") and it will be registering fonts with R using windowsFonts().
it seems windowsFonts function is not available when .RProfile is being interpreted. Not sure why, and any help to allow me to wrap my mind around this issue would be appreciated.