As we see in the cairoDevice documentation , in your mentioned functions there are different default values ββfor the pointsize parameter:
Cairo(width = 7, height = 7, pointsize = 8, surface = c("screen", "png", "pdf", "ps", "svg"), filename = Cairo_pdf(filename, width = 7, height = 7, pointsize = 10) Cairo_ps(filename, width = 7, height = 7, pointsize = 10) Cairo_svg(filename, width = 7, height = 7, pointsize = 10) Cairo_png(filename, width = 7, height = 7, pointsize = 10)
Taking the same pointsize
Cairo_png("test.png", 4, 4, pointsize = 8) par(bg = "red") plot.new() for (x in 1:30) mtext(format(x), line = -x, outer = TRUE, adj = 0, col = "white") dev.off()
returns this

source share