-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add italic
, fontweight
, and fontwidth
as aesthetics for geom_text()
and as arguments to element_text()
#6458
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
As we're converting to S7, do we want to already add these as properties to minimise backward compatibility pain in the next release? Alternatively, should we just allow a |
What kind of compatibility issues do you envision by adding properties at a later point? I don't think we should go the |
Say some extensions {foo} defines an
Fair point |
Good point. So maybe add them to |
* add S7 as import * custom properties for theme elements * convert theme elements to S7 classes * adapt element definitions * convert element_grob to S7 generic * replace merge_element by S7 * implement `$.element` for backward compatibility * Use S7 properties * fix `inherits()` issues * fix misc issues * Revert "implement `$.element` for backward compatibility" This reverts commit b038e8f. * don't rely on `element$prop` * move element properties * convert `margin` to S7 * I liked index properties as an idea but apparently they print badly * adapt failing example * import S7 * convert theme to S7 * Reimplement S3 <uneval> into S7 <mapping> * convert labels to S7 * make S7 class_ggplot * Use `@` as accessor * double dispatch for `ggplot_add()` * Write methods for external generics as S7 * backward compatibility for ggplot class * Implement <ggplot_built> as S7 * implement `as.gtable` methods * rename mapping to class_mapping * refine class_ggplot_built and related functions * also access ggplot_built slots with normal extractors * resolve gnarlyness in S3/S7 method conflicts * fix esoteric 'promise already under evaluation' error * fix series of minor issues * export theme as class * export labels class * collect classes in one place * revert @include decisions * Make S7 generic of `get_alt_text()` * backport `@` * exempt classes from pkgdown * lol at my incompetence * allow variant error messages * workaround for old R versions * update pkgdown index * backport `@` * S7-aware `is_theme_element()` * utility for grabbing props * use classic extractors and subassignment * fallback for `register_theme_elements()` * contingencies for `inherits(x, <S7>)` on old R versions * use `is_theme()` * sprinkle notes * bump staged deprecations * add linejoins * Disable `ggtext::element_markdown()` example * fix failing tests * redocument * fix doc links * soft-deprecate `%+%` * simplify logic block * don't evaluate code temporarily in FAQ example * run revdepcheck * recover from S3 mappings * enable classic subsetting for ggplot_built * fix typo * prevent NSE shenannigans * avoid `%+%` in test code * add 'meta' property to track arbitrary fields * document new property * fix stretchy guide bug * backward compatibility for `ggplot_add()` * backward compatibility for `ggplot_add()` * notes for the future * backward compatibility for `ggplot_gtable()` * backwards compatibility for `element_grob()` * keep theme class * add news bullet * redirect other news * add `italic`/`fontweight`/`fontwidth` properties (#6458) * contingencies for old elements * left out null/blank handling to from methods to generic * also merge s3 elements * revdepcheck * remove outdated duplicate * append old element classes * append old uneval class * append old ggplot classes * allow for numeric `face` * Symmetry between `$` and `[[` methods * Revert `ggplot()` constructor to S3 * fallback for unit margins * repair invalid theme * make `rotate_just()` resilient for mixed S3/S7 classes * redocument/snapshot * revdepcheck * contend with vector input * unify mapping validation * more carefullyl extract margins * try to prevent cyclical `+` * include snapshots * protection against vectorised input * fix typo * add `as.list()` method * be fussy about margin input length * tiny version bump * allow numeric colour * defend against insanity --------- Co-authored-by: Thomas Lin Pedersen <thomasp85@gmail.com>
As we all know the
fontface
spec is horribly limited. I think we can figure out a way to leverage systemfonts to circumvent this, though device support will be limited (quartz, ragg, and svglite AFAIK)However, it wouldn't impair on current behaviour so that really shouldn't be a blocker
The text was updated successfully, but these errors were encountered: