wilkelab / gridtext

Improved text rendering support for grid graphics in R
https://wilkelab.org/gridtext
Other
96 stars 17 forks source link

Feature request: text along path #12

Closed davidchall closed 4 years ago

davidchall commented 4 years ago

One feature that (I believe) is missing from the base grid package is the ability to render text along a curved path. There are quite a few use cases for this, but an example is https://github.com/tidyverse/ggplot2/issues/2946.

I found a matplotlib implementation on Stack Overflow (https://stackoverflow.com/a/44521963), but it quickly became clear that it's crucial to know the width of individual characters. This got me thinking that the gridtext package might be a good place to implement this?

I'm not really expecting a solution at any time, but just thought it might be something to keep in mind (especially since you mentioned elsewhere that you're planning to rewrite the rendering engine).

clauswilke commented 4 years ago

Sorry, this is out of scope. It requires an entirely different approach to text rendering. The next iteration of the rendering engine will focus on more complete HTML/CSS support. Text along a path is SVG, not HTML.

davidchall commented 4 years ago

Fair enough - thanks for the tip!