Custom font weight in plot

Since updating from R2021a to R2025a, I can't seem to be able to use the custom font I want to in plots.
Below is a minimal working example, which used to render the correct font, but which now renders Times.
figure;
plot(0:100,[0:100].^2);
set(gca,'FontName','Gill Sans Nova Book');
xlabel('Time (s)');
ylabel('Function, Z (kJ)');
Notes:
  • The font name is 'Gill Sans Nova' and that 'Book' is the weight, similarly to Light or Bold
  • If I input 'Gill Sans Nova' as fontname, it works and depicts Gill Sans Nova Regular
  • I tried setting the FontWeight to 'Book' but that is not a permitted input
  • If I copy the plot using print(gcf,'-dmeta') and then copy it in a Word document, the font renders correcly
  • I am running Windows 10
  • Font is installed as an administrator [edit: I meant Font is installed for all users]
Thanks in advance and best regards,

댓글 수: 9

What does
listfonts
ans = 18×1 cell array
{'Arial' } {'Arial Black' } {'Arial Narrow' } {'Comic Sans MS' } {'Courier' } {'Courier New' } {'Georgia' } {'Helvetica' } {'Impact' } {'Monospaced' } {'SansSerif' } {'Serif' } {'Symbol' } {'Terminal' } {'Times' } {'Times New Roman'} {'Trebuchet MS' } {'Verdana' }
return ?
Henri
Henri 2026년 4월 29일 14:49
It returns the following (i removed several lines for readability):
ans =
355×1 cell array
{'AcadEref' }
{'Adobe Garamond Pro' }
{'Adobe Garamond Pro Bold' }
[...]
{'Germany' }
{'Gigi' }
{'Gill Sans MT' }
{'Gill Sans MT Condensed' }
{'Gill Sans MT Ext Condensed Bold'}
{'Gill Sans Nova Book' }
{'Gill Sans Nova Light' }
{'Gill Sans Nova Medium' }
{'Gill Sans Nova SemiBold' }
{'Gill Sans Ultra Bold' }
{'Gill Sans Ultra Bold Condensed' }
{'Gloucester MT Extra Condensed' }
{'GothicE' }
[...]
{'Yu Gothic UI Semilight' }
{'ZWAdobeF' }
Do you still get "Gill Sans Nova Book" as available font if you type
listfonts(gca)
ans = 18×1 cell array
{'Arial' } {'Arial Black' } {'Arial Narrow' } {'Comic Sans MS' } {'Courier' } {'Courier New' } {'Georgia' } {'Helvetica' } {'Impact' } {'Monospaced' } {'SansSerif' } {'Serif' } {'Symbol' } {'Terminal' } {'Times' } {'Times New Roman'} {'Trebuchet MS' } {'Verdana' }
?
dpb
dpb 2026년 4월 29일 20:21
I'm still betting on not showing as installed for all users... <grin> That would explain Word finding it but not MATLAB. Seems like I recollect having seen before there being differences in searching between graphics and the fontnames list results.
May not turn out that way, but is an easy thing to check firstest...
Henri
Henri 2026년 4월 30일 12:17
I still get Gill Sans Nova Book available when I type listfonts(gca).
And the Gill Sans Nova family fonts are all in C:\Windows\Fonts; that confirms they are installed for all users doesn't it?
dpb
dpb 대략 13시간 전
편집: dpb 대략 11시간 전
"...that confirms they are installed for all users doesn't it?"
I don't think necessarily so, no. Did you follow the steps outlined to confirm? Or just reinstall to be sure?
As noted above, it may turn out that isn't the issue after all, but it should be ruled out definitely as the first step ... it has solved the issue every time I've seen it raised. Again, thre's always a chance of a first time but...
Henri
Henri 대략 12시간 전
I did reinstall for all users not once, not twice, but everytime I read that comment in forum posts.
The font is installed for all users.
Torsten
Torsten 대략 11시간 전
이동: Torsten 대략 11시간 전
If the font appears in "listfonts" and it is installed for all users, I cannot explain why MATLAB doesn't use it.
Maybe TMW can help by remotely logging in to your computer:
dpb
dpb 대략 10시간 전
편집: dpb 대략 8시간 전
Have restarted MATLAB after the reinstall, I presume.
As noted, it's been my experience on forum that reinstalling for all users has solved the problem but that doesn't necessarily mean it will in all cases; this appears to be one--but was still worth trying first.
listfonts scans the system's available fonts; see whether uisetfont will find it.
Just as a flyer, see if
hXL=xlabel('Time (s)','Interpreter','none');
might make any difference...and then what does
hXL.FontName
return?

댓글을 달려면 로그인하십시오.

답변 (1개)

dpb
dpb 2026년 4월 29일 15:19
편집: dpb 2026년 4월 29일 15:22

0 개 추천

"I tried setting the FontWeight to 'Book' but that is not a permitted input"
The font itself is the Book font; it isn't a font weight applied to the base font but is rendered as a separate font.

댓글 수: 3

Henri
Henri 2026년 4월 30일 12:23
In my case, the font is installed for all users indeed. It is present in C:\Windows\Fonts.
dpb
dpb 대략 13시간 전
편집: dpb 대략 12시간 전
Just because it is there doesn't mean ir was installed for all users....
Henri
Henri 대략 12시간 전
Yes you might be right. In any case, the font is installed for all users. In other words, I did install the font for all users.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

릴리스

R2025a

태그

질문:

2026년 4월 29일 13:30

편집:

dpb
2026년 5월 1일 16:00

Community Treasure Hunt

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

Start Hunting!

Translated by