MATLAB Answers

0

Helvetica problems in WIndows, broken characters when editing

Asked by Alex R. on 10 Jul 2016
Latest activity Commented on by Li ZHANG
on 6 Dec 2017
I'm using R2016a under Windows 8.1 x64 and I'm getting some weird behaviour. The default font for plots is Helvetica. I didn't use to have a problem with this in previous Matlab versions, but now when I try to edit anything in the plot GUI by double clicking them (e.g. axis labels, legend, text elements, etc), i get broken characters. They show fine when displayed, but are broken when are being edited.
For instance, consider this small piece of code:
plot(sin(0:0.001:5))
xlabel('This is my x label')
Here's a screenshot, figure shows correct characters: https://gyazo.com/cad7fd36a851517a38147f3663cbf2e3
Double-clicking the label to edit it shows broken characters: https://gyazo.com/e8453f2c54566dba721f305157c9b563
Moreover, when I attempt to change the font, the Helvetica preview also shows broken characters: https://gyazo.com/c4bf970655869ce14791b51f12888551
This happens regardless of whether or not I have the Helvetica font installed in Windows. I did restart Matlab in-between OS font changes.
Is there some font cache in Matlab that I need to erase maybe? If not, does anyone have a clue before I file a bug to Mathworks?

  0 Comments

Sign in to comment.

1 Answer

Answer by Li ZHANG
on 5 Dec 2017

Hi Alex,
Though it has been a long time, I'm wondering whether you have fixed this problem. I met the exactly same problem and once solved.
The method is to change the registry table of windows (Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes). There you can see Helvetica. Right click and choose Modify. Change the Data from Helvetica to Arial while keeping the name as Helvetica. Restart your MATLAB to see whether it works.
You can try. It worked for me on windows 8 with R2016. However, I updated my OS to windows10 and MATLAB to R2017b recently, this problem appears again and this method won't work for this time. I don't know why and I'm still working on it. If you have any solution, please tell me.
Regards, Li

  1 Comment

Hi Alex,
It's me again. I think I have fixed this problem. It seems that when you update your MATLAB, it will overwrite some settings. The MATLAB font library will somehow point to some wrong fonts no matter you have changed the font substitutes in the registry table or not if you have installed Helvetica before.
The solution is simple: delete every Helvetica related font.
And perhaps you need to delete them from CMD and run as administrator. Go to the windows fonts folder and delete every file starting from Hel using command line. After that, check your registry table to see whether the Helvetica is substituted by Arial. Restart your MATLAB, it should be done.
Regards,
Li

Sign in to comment.