Downloaded the font through the fontsquirrel as a TTF file.
Each font of the Latin Modern Roman was installed into the designated font Windows folder:
install.packages("extrafont")
library(extrafont)
library(ggplot2)
font_import(pattern = "lmroman*")
> Found FontName for 0 fonts
loadfonts(device = "win")
> LM Roman 10 already registered with windowsFonts().
LM Roman Caps 10 already registered with windowsFonts().
LM Roman Demi 10 already registered with windowsFonts().
LM Roman Dunhill 10 already registered with windowsFonts().
LM Roman Slanted 10 already registered with windowsFonts().
par(family = "LM Roman 10") # No message; as if loaded in correctly
When running the theme()
code below it does not change the font. It keeps it as the default text font with R ggplot2
plots:
plot1 +
geom_bar() +
theme(text = element_text(size = 10, family = "LM Roman 10"))
I tried everything above and was expecting the font to change in the final bar plot.