altmany / export_fig

A MATLAB toolbox for exporting publication quality figures
BSD 3-Clause "New" or "Revised" License
1.27k stars 365 forks source link

Can't correctly embed font name #364

Closed Lrrrence closed 1 year ago

Lrrrence commented 1 year ago

I realise that this issue has already been solved through the use of -regexprep etc. but unfortunately I can't quite figure it out for my case.

I am using set(gca,'fontname','Libertinus Sans'), which I later like to edit in Illustrator, which sees the embedded font name as "LibertinusSans". How do I ensure that the space is included when export_fig produces the file?

altmany commented 1 year ago

You can try

export_fig(..., '-regexprep', 'LibertinusSans', 'Libertinus Sans')

This is untested so use at your own risk...