Matlab 2025a export figure as vector changes font
    19 ビュー (過去 30 日間)
  
       古いコメントを表示
    
I have a figure configured the way that I want that I'm trying to export as an SVG. The new export window in 2025a lets me specify SVG and vector graphics, but when I do it changes my fonts from times new roman to something else (Arial I think?). I cannot find a way to make it preserve the font settings. Is there a solution I'm missing? In the meantime I'll have to go back to 2024b. 
0 件のコメント
採用された回答
  Kevin Holly
    
 2025 年 9 月 4 日
        
      編集済み: Kevin Holly
    
 2025 年 9 月 4 日
  
      Thomas,
I tested the exportgraphics on the following figure and it exported correctly for me. Are you on R2025a Update 1?
fig = figure; ax = axes(fig);title(ax,"Times New Romans Font");ax.FontName = 'Times New Roman';
exportgraphics(fig, 'myfigure.svg', 'ContentType', 'vector');
You can run this line in MATLAB Online to view results:
fig2 = uifigure; h = uihtml(fig2,"HTMLSource",'myfigure.svg'); h.Position = [ 0 0 fig2.Position(3) fig2.Position(4)];
2 件のコメント
  Kevin Holly
    
 2025 年 9 月 8 日
				
      編集済み: Kevin Holly
    
 2025 年 9 月 8 日
  
			Thomas,
I have reported the issue to development and they have identified the issue and are resolving it.
In the meantime, if you set(gca,'FontName','times') to set(gca,'FontName','Times') instead, you should not have an issue.
Best,
Kevin Holly
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




