ggthemr icon indicating copy to clipboard operation
ggthemr copied to clipboard

What is the text family?

Open GabriellaS-K opened this issue 2 years ago • 2 comments

Hi,

Thank you for a brilliant package! Have used it for my plots but there is one that it isn't compatible with, so I'm adjusting a few things so that graph isn't the odd one out. I found info about the colours for my chosen theme ("flat") in your documents, but I can't find what the text font is, is this something you can tell me? Thanks!

GabriellaS-K avatar Sep 24 '21 20:09 GabriellaS-K

Hey not sure which is the base fonts in these themes, but you should be able to add your own theme(text = element_text(family = "fonthere") which should work.

Matt-Int avatar Oct 12 '21 19:10 Matt-Int

Just tested it, and on linux the following bit works:

library(ggthemr)
ggthemr("flat")

ggplot(mtcars, aes(factor(vs), mpg, fill = factor(am))) + 
geom_col() +
theme(text = element_text(family = "Fira Code"))

Matt-Int avatar Oct 12 '21 19:10 Matt-Int