R plot fonts problem

I don’t have any specific reason to believe that this is Clear Linux related, but because Clear uses special builds and I haven’t gotten help elsewhere, I figured I’d try here:
The original question was posted on SO (if you answer it there too, you can get a bounty):

I am having a problem where some graphics devices print missing glyph boxes instead of characters. Actually, the only device I have tried so far that renders characters is PDF. Since I recently updated R and rebuilt a bunch of packages, I suspect that may have something to do with it. Here is a screenshot comparing output with four devices, jpeg, pdf, svg, and png.

Although I first encountered the problem in Rstudio with the rcorr package, the issue occurs when I run as an Rscript from the command line and with a basic boxplot.

require(corrplot)
M<-cor(mtcars)
corrplot(M, method="circle")
dev.off()
pdf("test2.pdf")
corrplot(M, method="circle")
dev.off()
png("test2.png")
corrplot(M, method="circle")
dev.off()
jpeg("test2.jpeg")
corrplot(M, method="circle")
dev.off()
svg("test2.svg")
corrplot(M, method="circle")
dev.off()

pdf("test3.pdf")
boxplot(M, method="circle")
dev.off()
png("test3.png")
boxplot(M, method="circle")
dev.off()
jpeg("test3.jpeg")
boxplot(M, method="circle")
dev.off()
svg("test3.svg")
boxplot(M, method="circle")
dev.off()


Session info:


> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-generic-linux-gnu (64-bit)
Running under: Clear Linux OS

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblas_nehalemp-r0.3.7.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] showtext_0.7     showtextdb_2.0   sysfonts_0.8     cairoDevice_2.28 corrplot_0.84   

loaded via a namespace (and not attached):
[1] compiler_3.6.2 tools_3.6.2   

outputs:

comparison of graphics devices output
problem is not limited to rcorr

I’m bumping this because it’s still happening and I have made no progress towards finding a solution.

I cannot replicate the error.
What I did is, in in a R session in terminal,

  • require(corrplot)
  • M <- cor(mtcars)
  • corrplot(M, method = “circle”)

Then I can see the characters rendered correctly.

I wasn’t able to recreate it either. It works fine on mine. I tested it on CL 32680 in case that helps.

Can reproduce this.

@jbhanks given you opened the pictures in plasma apps, is it safe to say you have the plasma desktop installed? The other difference I have than others is that I don’t have the desktop bundle installed (or any other gnome related bundle). Also virtually no dev bundles installed.