Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have header font be part of theme specification #5886

Open
thomasp85 opened this issue May 9, 2024 · 2 comments · May be fixed by #5887
Open

Have header font be part of theme specification #5886

thomasp85 opened this issue May 9, 2024 · 2 comments · May be fixed by #5887
Labels
feature a feature request or enhancement themes 💃

Comments

@thomasp85
Copy link
Member

Currently the theme constructors takes a base font argument to set the font for the titles/headers.

This ties into #5833 as we should also keep at least two fonts in the geom defaults inside themes

@teunbrand
Copy link
Collaborator

teunbrand commented May 9, 2024

Is the proposal here to do something like the following?

theme_grey <- function(..., base_family = "", header_family = base_family) {
  theme(
    text = element_text(family = base_family),
    title = element_text(family = header_family),
    ...
  )
}

@teunbrand teunbrand added themes 💃 feature a feature request or enhancement labels May 9, 2024
@thomasp85
Copy link
Member Author

Yes, exactly. I think subtitle and caption should inherit from the base font and title, axis title and guide title should inherit from the header font

@teunbrand teunbrand linked a pull request May 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement themes 💃
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants