Closed ellisp closed 9 years ago
@yixuan any thoughts on what might cause this?
As far as I know this is because RSvgDevice
has not yet implemented the path()
device function. showtext
by default calls the path()
device function to draw characters, and if it is not implemented, polygon()
will be used instead as a fallback. However, the color filling strategy in polygon()
is not as nice as path()
, so the dollar sign has weird colors inside.
I could prepare a PR later to add the path()
function to RSvgDevice
if needed. :-)
The PR https://github.com/mdecorde/RSvgDevice/pull/37 can solve this issue.
Below are the plots created by the new version:
Works great, thanks.
You may not even be aiming to work fully with {showtext} and it might be showtext's problem rather than yours, but for the record while this device works mostly ok with google fonts imported by showtext, in at least one situation ($ rotated 90 degrees) it doesn't work as well as grDevices::svg
Here's the devSVG version - notice the dollar sign on the y axis is a (little but noticeable) bit corrupt:
Here's the svg version, which works fine:
(the old version of R is deliberate to mimic my work setup, where upgrades of R are non-trivial so less frequent)