【发布时间】:2014-03-19 19:43:37
【问题描述】:
我目前正在使用 eps2eps 和 epstopdf 在 Matlab 中编写脚本。当我使用 Matlab 中的 eps2eps 或 epstopdf 时,会发生以下情况:
>> system('eps2eps TEMP97062.ps TEMP97062.eps');
Error: /undefined in --definefont--
Operand stack:
false CMR10 --dict:12/21(L)-- Font definefont --dict:30/32(L)-- unknownerror
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1900 1 3 %oparray_pop 1899 1 3 %oparray_pop 1883 1 3 %oparray_pop 1771 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 1762 3 3 %oparray_pop --nostringval-- --nostringval-- 1850 3 4 %oparray_pop --nostringval--
Dictionary stack:
--dict:1171/1684(ro)(G)-- --dict:0/20(G)-- --dict:81/200(L)-- --dict:1171/1684(ro)(G)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.10: Unrecoverable error, exit code 1
但是: 如果我使用 bash 中的 eps2eps,一切都会完美无缺。
这可能是找不到字体的问题吗?
到目前为止我做了什么: 我检查了bash和matlab的环境值,指向字体的都是一样的。 我将 /usr/share/fonts/Type1/ 目录添加到 matlab 路径中。没有变化。 谷歌我发现了一些其他未定义的问题。似乎没有任何关系,或者建议的更改不适用或不起作用。 我试图用另一个系统重现这个问题,它可以工作。
我的系统:
Arch Linux 64-Bit with KDE (Kernel 3.13.6-1-ARCH)
Ghostscript 9.10
epstopdf 2.21
Matlab 2013a for Unix
任何建议是什么导致了这个问题以及我如何解决这个问题?
感谢您的帮助!
//编辑:I uploaded one of the files i'm using
///编辑:我试图将 GS_PATH 从“/home/matze/.fonts”更改为“/home/matze/.fonts:/usr/share/fonts/TTF:/usr/share/fonts/Type1 :/usr/share/fonts" 来自 Matlab。但是如果我再次打印变量,它仍然有旧的内容。
【问题讨论】:
-
错误很明显:找不到字体“CMR10”。您设置了路径,但您是否将字体添加到 GS? “要添加自己的字体,您必须编辑 Fontmap 以在末尾包含新字体的条目”,首先点击“ghostscript 添加字体”。
-
谢谢,睡觉后试试。但是如果字体没有正确安装,为什么 eps2eps 直接从 shell 工作?
标签: bash matlab pdf ghostscript postscript