Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export_fig embedded fonts in Matlab R2018a #258

Open
gideonbo opened this issue Oct 30, 2018 · 2 comments
Open

Export_fig embedded fonts in Matlab R2018a #258

gideonbo opened this issue Oct 30, 2018 · 2 comments

Comments

@gideonbo
Copy link

gideonbo commented Oct 30, 2018

Hi,

I'm trying to export a figure in PDF format with the Palatino and Cambria fonts.

The matlab code is as follows:

x = rand(4,2);
figure('color', 'w');
b = bar(x, 'barwidth', 0.9) ;
b(1).FaceColor = [ 0    0.4470    0.7410];
b(2).FaceColor = [ 0.6350    0.0780    0.1840];
set(gca, 'fontsize', 20, 'fontname', 'cambria', 'fontweight', 'bold', 'xticklabel',  {'0-1', '2-5', '6-10', '>10'});
ylabel('Vertical Axis', 'fontname', 'palatino')
xlabel('Horizontal Axis', 'fontname', 'palatino')
leg = legend('Model', 'Data', 'Location', 'Northeast');
set(leg, 'box', 'off', 'fontname', 'palatino')
grid on
export_fig example -pdf -painters -nofontswap

This is the resulting figure: (note fonts have been altered)
example.pdf

Am I doing something wrong?
Any help is greatly appreciated!

altmany added a commit that referenced this issue Mar 21, 2019
@altmany
Copy link
Owner

altmany commented Mar 21, 2019

The latest commit should hopefully improve the situation, but the underlying problem remains unsolved, because I cannot figure out how to force the EPS postscript engine to load the user font from disk.
Leaving this issue open for now.

@altmany
Copy link
Owner

altmany commented Dec 9, 2020

See related issue #324

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants