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: scale font to fit text into single line #64

Open
Mashin6 opened this issue May 3, 2021 · 0 comments
Open

feature request: scale font to fit text into single line #64

Mashin6 opened this issue May 3, 2021 · 0 comments

Comments

@Mashin6
Copy link

Mashin6 commented May 3, 2021

Maybe this is already supported, but I couldn't find it. Sometimes I don't want to wrap the text just because it is 1 or 2 characters too long and more aesthetically pleasing is to make the font a little smaller, but all text stays in one line.

Currently element_textbox() support wrapping of long text into multiple lines, but a nice feature would be to automatically adjust font size so the whole text still fits into single line. So something what ggfittext is doing in geom_fit_text(), but this would be for element_textbox().

I feel like this should be possible since ggtext already knows how many characters of a given font size fit into a line before new line break is needed.

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

1 participant