gridpattern icon indicating copy to clipboard operation
gridpattern copied to clipboard

Text variant that support "density" instead of "size"

Open trevorld opened this issue 4 years ago • 1 comments

  • Current "text" pattern adjusts glyph size by adjusting the "size" parameter which sets the glyphs fontsize. This was easy to understand and implement and gets the job done.
  • It would be cool for an alternative implementation where one could adjust glyph size by setting the "density" parameter like with the "circle", "pch", "regular_polygon" patterns.
  • Theoretically could use something like systemfonts::glyph_info() to calculate an appropriate bounding box...
  • If implemented could add such support to existing "pch" pattern (since grid.points() supported arbitrary text characters)?

trevorld avatar Dec 02 '21 06:12 trevorld

  • An alternative to systemfonts::glyph_info() would be to use the functions in https://github.com/yutannihilation/string2path and then re-normalize their x/y calculations

trevorld avatar Jul 17 '22 21:07 trevorld