Word on the street is that R 4.3.0 bequeaths the R graphics system and {grid} with a way to typeset glyphs much more precisely than it currently (R <= 4.2.x) allows. More info here: https://github.com/pmur002/glyphs-report (I had to clone and read the html locally).
Briefly, instead of making a rather complicated textGrob() at the end of {geomtextpath}'s efforts to place text, we might instead make a glyphGrob() (I think). This should free us from having to wrestle with translating back glyphs to character representation, which in turn might allow us to simplify this section of code: https://github.com/teunbrand/geomtextpath/blob/ca78a4f3a4b0c989e213e5b60f32eba523bc28cd/R/text_helpers.R#L206
We'd still need the textshaping library to do kerning and bidi text and whatnot, but we should be able to replace a fragile piece of ducktape. I'd have no qualms of increasing the required R version, as we haven't committed to staying backward compatible for some number of R versions.
Word on the street is that R 4.3.0 bequeaths the R graphics system and {grid} with a way to typeset glyphs much more precisely than it currently (R <= 4.2.x) allows. More info here: https://github.com/pmur002/glyphs-report (I had to clone and read the html locally).
Briefly, instead of making a rather complicated
textGrob()at the end of {geomtextpath}'s efforts to place text, we might instead make aglyphGrob()(I think). This should free us from having to wrestle with translating back glyphs to character representation, which in turn might allow us to simplify this section of code: https://github.com/teunbrand/geomtextpath/blob/ca78a4f3a4b0c989e213e5b60f32eba523bc28cd/R/text_helpers.R#L206We'd still need the textshaping library to do kerning and bidi text and whatnot, but we should be able to replace a fragile piece of ducktape. I'd have no qualms of increasing the required R version, as we haven't committed to staying backward compatible for some number of R versions.