Is it possible to get around MATLAB's limitation on font embedding in vector format files?

自古美人都是妖i 提交于 2019-11-30 09:58:55

If I'm reading that link correctly, not all fonts get substituted. From 'Choosing a Printer Driver':

The table below lists the fonts supported by the MATLAB PostScript and Ghostscript drivers when generated with the Painters renderer (fully vectorized output). This same set of fonts is supported on both Windows and UNIX:

AvantGarde
Helvetica-Narrow
Times-Roman
Bookman
NewCenturySchlbk
ZapfChancery
Courier
Palatino
ZapfDingbats
Helvetica
Symbol

So, if you use one of the above fonts, the output vector-format figure should maintain the correct font. See for example:

list_fonts = listfonts
figure('renderer','painters'),
plot(peaks),
xlabel('this font is Helvetica','fontname','Helvetica','fontsize',24)
set(gcf,'paperpositionmode','auto')
print(gcf,'-depsc2','test1.eps')

Which produces:

So, choose one of the fonts from the list above, and the font will be output correctly. Otherwise, change the font in your presentation to match one of the above fonts.

I also encountered this problem for many times, and I have an simple but effective way that never fails me (on Windows, need GSview).

1) save fig as PDF

2) save PDF as ps

3) open ps with GSview, then click "File->PS to EPS", specify a file name and done.

Hope this helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!