2

I need to use a specific font for my ggplots, and i set in in the theme

theme_set(theme_minimal(
  base_family="Calibri",
  base_size=8
))

however, when i try to use face=bold for my axes it does not seem to apply and shows them as regular, not bold. The minute i remove base_family, the "boldness" is back...

How can i fix this?

ggplot(data = mpg, aes(x = class)) +
  geom_bar(stat = "count")+
  theme(
    axis.title = element_text(face="bold"), #10pt bold
    axis.text= element_text(size = 9, colour = "black") #9pt
  )
m45ha
  • 399
  • 1
  • 9
  • 1
    If you manually added Calibri to your machine (which I think you might have based on [your earlier question](https://stackoverflow.com/q/74973809/17303805)), did you also add the [.ttfs for Calibri bold and Calibri italics](https://github.com/jondot/dotfiles/tree/master/.fonts)? – zephryl Jan 02 '23 at 03:28
  • 1
    Do you have Calibri bold on your computer? Is it accessible in R? Calibri isn't built-in. You can check with`systemfonts::match_font('Calibri')`. For example, on my machine, that returns Helvetica (since I don't have this font). You can see all available fonts and their available faces with `systemfonts::system_font()`, you could save this as a data frame and filter by family. – Kat Jan 02 '23 at 03:29

0 Answers0