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

[Feature request] - Add arguments to bbc_style() for easy customization #8

Open
edgararuiz-zz opened this issue Feb 11, 2019 · 3 comments

Comments

@edgararuiz-zz
Copy link

Windows machines do not support Helvetica font type, so I had to make modifications to the bbc_style() in a separate ggplot2() function. It would be cool to have maybe a font argument that defaults to Helvetica, but would allow others to change the font name. Once the font changes, there may be some sizing differences, so it would also be cool to create an offset size, to do a plus or minus the current font sizes used in your function: bbc_style <- function(font = "Helvetica", offset = 0), which would allow me to use it like this: bbc_style("Arial", -2).

@jlopezper
Copy link

@edgararuiz could you please check whether my PR fits your request?

@edgararuiz-zz
Copy link
Author

Yes! I just re ran my script using your fork and it worked like a charm. Thanks!

@atusy
Copy link

atusy commented Jun 19, 2019

I think bbc_style better have arguments consistent to ggplot2 theme_* functions like below, and sizes being controled by ggplot2::rel().

bbc_style <- function(
  base_size, 
  base_family = "Helvetica", 
  base_line_size, 
  base_rect_size, 
  offset = 0
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants