NikNakk / forestmodel

42 stars 13 forks source link

Font family supplied via theme(text = ...) is not honored in plot headings #40

Open nbenn opened 2 years ago

nbenn commented 2 years ago

When supplying a custom font via theme(text = element_text(family = ...)), this is picked up in some places, i.e.

https://github.com/NikNakk/forestmodel/blob/09cb5b258596c2b491b3956b97bda7d45a1fa910/R/recalculate_width_panels.R#L13

but in other places, this is ignored, i.e.

https://github.com/NikNakk/forestmodel/blob/09cb5b258596c2b491b3956b97bda7d45a1fa910/R/panel_forest_plot.R#L414-L418

My issue goes away, when I patch through family = theme$text$family to the aes() call in line 414.