MatthewBJane / ThemePark

Fun ggplot themes for popular culture
http://matthewbjane.com/ThemePark/
MIT License
196 stars 13 forks source link

barbie_font = FALSE #27

Closed ASKurz closed 1 year ago

ASKurz commented 1 year ago

I just downloaded ThemePark this afternoon (version 0.0.0.9000). When I use theme_barbie()with barbie_font = FALSE, it works, but I get a very long repeating warning. Here's a quick example code:

library(tidyverse)
library(ThemePark)

mtcars %>% 
  ggplot(aes(mpg, wt)) +
  geom_point() +
  theme_barbie(barbie_font = FALSE) 
Screenshot 2023-08-13 at 4 53 11 PM

The warning, which I'll not show in full here, is a long repeating block of the following:

Warning: font family 'Arial' not found, will use 'sans' instead
ASKurz commented 1 year ago

As a side comment, I generally find theme_barbie(barbie_font = TRUE) delightful, but it doesn't work great when you want to use Greek symbols in your titles.

MatthewBJane commented 1 year ago

Hey Solomon, For the first comment: yeah the default font should be 'sans' not 'Arial' so I will make that change for all the themes. Thanks for pointing that out. For the Second comment: Honestly, I am not sure how to solve this issue, @christopherkenny or @lukepilling may have some ideas.

MatthewBJane commented 1 year ago

Follow up: First comment has been resolved. When name_theme(name_font=FALSE) the font is now 'sans' for all themes.

ASKurz commented 1 year ago

Woot!

christopherkenny commented 1 year ago

I suspect the second problem is a function of the Barbie font not implementing Greek characters. I'm not aware of any patterns that would allow for multiple fonts within a label at once to get around that.