嵌入字体出现“未知设备: pswrite”错误提示

12

在我创建的某个EPS文件上运行embedFonts时,出现错误消息:

> embedFonts("foo.ps")
Unknown device: pswrite
Unrecoverable error: undefined in .uninstallpagedevice
Operand stack:
    defaultdevice
Error in embedFonts("foo.ps") : 
  status 1 in running command 'gs -dNOPAUSE -dBATCH -q -dAutoRotatePages=/None -sDEVICE=pswrite -sOutputFile=/tmp/Rtmp3Lv0dj/Rembed2cd86df573a1 '-sFONTPATH='  'foo.ps''

我该如何避免这个错误?

1个回答

14
这是因为现在设备被称为ps2write。不支持写入后置脚本级别1。下一个R版本(我们目前是3.1.0,所以可能是3.2左右)将包含修复程序。引用更改列表:
  

embedFonts()现在默认为format =“ps2write”,适用于.ps.eps文件。这在Ghostscript 9.x中可用(自2010年以来),而先前的默认值format =“pswrite”在9.10中被删除。

因此,快速解决方法是手动将format =“ps2write”传递给embedFonts调用。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接