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

Avoid calling register_font() unless the current device is a ragg device #74

Closed cpsievert closed 3 years ago

cpsievert commented 3 years ago

See also #73, register_font() can be expensive becuas:

> system.time(systemfonts::system_fonts())
   user  system elapsed 
  0.682   0.113   1.032 
> system.time(systemfonts::system_fonts())
   user  system elapsed 
  0.010   0.001   0.013 
> system.time(systemfonts::system_fonts())
   user  system elapsed 
  0.012   0.002   0.014 
cpsievert commented 3 years ago

This was done in https://github.com/rstudio/thematic/commit/8711d8072e12125d88b0646754833461ed2e16c7