Closed bersbersbers closed 3 years ago
This is probably due to rounding errors because ggtext breaks down the text into individual pieces and calculates where they should be placed. Try to render this at a higher resolution and see if it gets better.
If it is due to rounding errors, there isn't much I can do at this time.
This is probably due to rounding errors because ggtext breaks down the test into individual pieces and calculates where they should be placed.
Thanks - this explains why the second part jumps around while the first one remains pixel-perfect. I'm already at a quite high resolution - what I did was to lower the resolution, which fixed the issue for now.
@clauswilke
If it is due to rounding errors, there isn't much I can do at this time.
Could you point me to the place in the code where this rounding occurs? I imagine that these individual pieces are placed based on where each previous piece (generally, the one left of it) is placed. If that is the case, I'd think that one should be able to compute the rounding error of each piece and propagate it to the next element to maybe alleviate this issue.
I could imagine that it's here somewhere:
or here:
This should be fixed once we switch over to the sinab rendering engine, because it doesn't break strings into pieces unless needed for formatting changes. See #53.
Do I need to say more? ;)