Effacer les filtres
Effacer les filtres

Save figure as pdf without changing fontname

19 vues (au cours des 30 derniers jours)
Johannes
Johannes le 22 Août 2018
Hello everyone, if I try to save a plot figure as pdf, where the font name of the axes and legend is changed to LM Roman, the text in the saved pdf hasn't LM Roman as font name. How can I fix this bug?
A short example:
plot(rand(10,1)); set(gca, 'FontName','LM Roman 10');
Thank you for your help.
  4 commentaires
Johannes
Johannes le 23 Août 2018
Modifié(e) : Johannes le 23 Août 2018
Hello Jonas, if I use the "save as" button, or if I use the print function, it always changes the font to the standard Font.
The first image shows, the figure before exporting with LM Roman
The second picture shows the pdf-result after exporting the file.
jonas
jonas le 23 Août 2018
Have you tried with a different font, say Times new roman?

Connectez-vous pour commenter.

Réponses (4)

Yuvaraj Venkataswamy
Yuvaraj Venkataswamy le 22 Août 2018

Johannes
Johannes le 22 Août 2018
Thank you for your answer. But the problem isn't how to export a figure to pdf.
The problem is, that the Font Name is changed during exporting the figure to pdf.

Lilly Verso
Lilly Verso le 31 Août 2018
I have exactly the same issue. Please let me know if you solved it.
Best
  2 commentaires
Lilly Verso
Lilly Verso le 2 Juin 2019
Modifié(e) : Lilly Verso le 2 Juin 2019
Scott Cohen
Scott Cohen le 11 Oct 2019
I have exactly the same issue as well. And export_fig does has not helped me with it.

Connectez-vous pour commenter.


Scott Cohen
Scott Cohen le 11 Oct 2019
I'm no expert on matlab, or any of these kinds of things, but after finding no resolution from this answer or anywhere else, I think I may have found a solution. I printed my figure using Microsoft XPS Document Writer, saving as an .oxps file. Then I searched online to find how to convert from .oxps to .eps, which is what I wanted. I found this site, which did the trick: https://convertio.co/oxps-eps/

Catégories

En savoir plus sur Graphics Performance dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by