I have a chart created with ggplot2 and I'd like to use CairoPNG because especially when creating pie chart png and jpeg create a very pixilated image. The problem is that CairoPNG seems to modify the text size and so, especially in the legend, the text of one key overlaps other key, or, like in the above
library(ggplot2)
library(Cairo)
df <- data.frame(id=c("IMPORT VALUES YTD", "EXPORT VALUE YTD"),
value=c(6,4))
chart <- ggplot(df) +
geom_bar(aes(x=factor(1), y=value, fill=factor(id)),
stat="identity", width = 1, color="white") +
coord_polar(theta="y") +
theme(legend.title=element_blank(),
legend.position="top",
legend.text=element_text(size=14))
CairoPNG("test1.png", 350, 400)
chart
dev.off()

png("test2.png", 350, 400)
chart
dev.off()

Do you know how to avoid this?
