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

Document font size units in theme_bw() etc #3458

Closed
hadley opened this issue Jul 26, 2019 · 5 comments
Closed

Document font size units in theme_bw() etc #3458

hadley opened this issue Jul 26, 2019 · 5 comments
Labels
documentation good first issue ❤️ good issue for first-time contributors help wanted ❤️ we'd love your help! tidy-dev-day 🤓 Tidyverse Developer Day

Comments

@hadley
Copy link
Member

hadley commented Jul 26, 2019

I assume they're points?

@clauswilke
Copy link
Member

Yes. From the documentation of gpar():

fontsize The size of text (in points)

Also:

library(grid)

g <- textGrob("pQgj", gp = gpar(fontfamily = "Helvetica", fontsize = 11))
convertHeight(grobHeight(g)+grobDescent(g), "pt")
#> [1] 10.3619543457031pt

g <- textGrob("pQgj", gp = gpar(fontfamily = "Times", fontsize = 11))
convertHeight(grobHeight(g)+grobDescent(g), "pt")
#> [1] 9.72039733886718pt

g <- textGrob("pQgj", gp = gpar(fontfamily = "Palatino", fontsize = 11))
convertHeight(grobHeight(g)+grobDescent(g), "pt")
#> [1] 10.7123846435547pt

Created on 2019-07-26 by the reprex package (v0.3.0)

@hadley hadley added documentation good first issue ❤️ good issue for first-time contributors help wanted ❤️ we'd love your help! labels Jul 26, 2019
@hadley
Copy link
Member Author

hadley commented Jul 26, 2019

Should be explicit that it's not mm unlike geom_text() etc, and should probably mention .pt

brwheeler added a commit to brwheeler/ggplot2 that referenced this issue Nov 19, 2019
I used the changes proposed in tidyverse#3458 by explicitly that it's not `mm` and mentioning `.pt`. Also capitalized first letters and added punctuation to be consistent with other text on page.
@thomasp85 thomasp85 added the tidy-dev-day 🤓 Tidyverse Developer Day label Jan 21, 2020
melimore86 added a commit to melimore86/ggplot2 that referenced this issue Feb 1, 2020
clauswilke added a commit that referenced this issue May 2, 2020
* updating font size units for #3458

* making an update with correct read lines setting

* adding the font size units in issue #3258

* incorporate edit suggestion by @thomasp85.

Co-authored-by: Claus Wilke <wilke@austin.utexas.edu>
@clauswilke
Copy link
Member

This has been improved somewhat with PR #3787 but there's probably room for further improvement, so leaving this open.

@boa50
Copy link

boa50 commented Mar 13, 2023

What can I do to help document this?

@teunbrand
Copy link
Collaborator

I'm considering this closed per #3787, #5260 and #5446.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation good first issue ❤️ good issue for first-time contributors help wanted ❤️ we'd love your help! tidy-dev-day 🤓 Tidyverse Developer Day
Projects
None yet
Development

No branches or pull requests

5 participants