【发布时间】:2021-12-12 05:42:34
【问题描述】:
当我使用 embedFonts 将字体嵌入 EPS 文件时,纸张大小会发生变化,并且我的 R 绘图图形位于左下角。这个问题已经在这里问过embed_fonts() changes paper size on encapsulated postscript (.eps, R),但没有解决。所以这是一个最小工作示例的问题。我在 macOS Big Sur 上使用 R 版本 4.1.1 和 Ghostscript 版本 9.50 或 9.54.0。
fileName = 'WithoutFonts.eps'
fileNameEmbed = 'WithEmbeddedFonts.eps'
setEPS()
postscript( file = fileName, height = 5, width = 4 )
plot( rnorm(100), rnorm(100), main = 'Random Values' )
dev.off()
embedFonts( file = fileName, format = 'eps2write', outfile = fileNameEmbed )
【问题讨论】: