Yet another great R package by hrbrmstr.
theme_ipsum_rc() #
I’m a huge fan of the theme_ipsum_rc()
theme, but it does take a bit of extra work to get the development environment to play nicely with this one.
The main hickup seems to be around how fonts are handled by R and the OS.
The steps necessary to get this to work:
-
Install the roboto font. On a Mac, use the Font Book.
-
From R, run
system(sprintf("open %s", system.file("fonts", package = "hrbrthemes")))
. This pops open a finder window of fonts. -
Manually copy the fonts over to
~/Library/Fonts
-
From R, run
extrafont::font_import("~/Library/Fonts")
-
Wherever you plan to use
theme_ipsum_rc()
, be sure to runextrafont::loadfonts(quiet = TRUE)
at the top.
Whenever there’s a system or R upgrade, be sure to run extrafont::font_import("~/Library/Fonts")
again.