rstudio / thematic

Theme ggplot2, lattice, and base graphics based on a few simple settings.
https://rstudio.github.io/thematic/
Other
244 stars 10 forks source link

Downgrade systemfonts/sysfonts errors to warnings #73

Closed cpsievert closed 3 years ago

cpsievert commented 3 years ago

Suppresses an error message thrown by systemfonts in the case that you try using a Google Font that is already installed as a system font, for example

thematic_on(
  bg = "#212121",
  fg = "#ffffff",
  accent = "#354b63",
  font = font_spec(scale = 1.5, families = "Neucha")
)
Error : A system font with that family name already exist

(To reproduce, you'd have to install Neucha as a system font. Note that plots should still render fine in this case, making the error message superfluous)