radian
radian copied to clipboard
Plots display broken fonts
running
plot(rnorm(100), rnorm(100))
produces
Running the same line in a regular R console produces a normal plot with correct fonts
I'm running R 4.0.3 + radian on Ubuntu 18.04.
It was reported multiple times. But I really have no clue.
Maybe related to fontconfig https://stackoverflow.com/questions/62031847/ggplot-axes-are-garbled-look-like-unicode-boxes
Thank you for pointing this out! I still have no clue how to implement the solution (partially because ${pkgs.fontconfig.out}
is not valid BASH, which means that there is a different tool being used here and the only blogs that I can find that even begin to describe what this is are in a language I do not understand), but this definitely brings me closer to understanding the issue.
Had the same problem on an Ubuntu machine and I think the problem is that the standard R fonts are not installed. By adding family='Sans'
you can tell R to use whatever sans-serif font is available (So run plot(rnorm(100), rnorm(100), family='Sans')
).
I don't really understand why this is not required when using the standard R terminal but that's my workaround for now.
I also found this thread where it was suggested to install r-cairo
via conda but all that did was break the fonts on standard R which is even more confusing to me...