Skip to content

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? 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

Open
thomasp85 opened this issue May 14, 2025 · 4 comments
Labels
feature a feature request or enhancement layers 📈 themes 💃
Milestone

Comments

@thomasp85
Copy link
Member

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

@thomasp85 thomasp85 added this to the Editioning milestone May 14, 2025
@thomasp85 thomasp85 added feature a feature request or enhancement themes 💃 layers 📈 labels May 14, 2025
@teunbrand
Copy link
Collaborator

teunbrand commented May 29, 2025

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 grid::glyphFont()?

@thomasp85
Copy link
Member Author

What kind of compatibility issues do you envision by adding properties at a later point?

I don't think we should go the glyphFont route -- that would prevent us from eg scaling weight

@teunbrand
Copy link
Collaborator

teunbrand commented May 29, 2025

Say some extensions {foo} defines an element_text subclass. Their class definition is fixed upon build time. ggplot2 updates their element_text definition with new properties. The {foo} subclass is now incomplete. If we include these properties now, the {foo} subclass will not be incomplete later.

I don't think we should go the glyphFont route -- that would prevent us from eg scaling weight

Fair point

@thomasp85
Copy link
Member Author

Good point. So maybe add them to element_text() but don't have them in the constructor etc

teunbrand added a commit to teunbrand/ggplot2 that referenced this issue May 29, 2025
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 layers 📈 themes 💃
Projects
None yet
Development

No branches or pull requests

2 participants