In ggplot2, font size is based on a constant for converting points, inches, and mm: https://github.com/tidyverse/ggplot2/blob/main/R/geom-.r line 193, as discussed here. I apparently need to reference the ggplot2:::.pt constant in a package, where it is frowned upon to include internal functions from other package. How should I do this to minimize headaches for myself, users, and ggplot2 auhtors/maintainers? For example, I could copy the ggplot2 source code in my package (seems allowed by MIT license), ask the ggplot2 authors to export the graphical_units objects, or I could paraphrase... Thanks for your suggestions!
CodePudding user response:
.pt (and .stroke) are already exported graphical units from ggplot2 so can be imported into your package using the standard ggplot2::.pt or @importFrom ggplot2 .pt.
