Why does MATLAB not show any newly installed fonts since updating to Windows version 1809?

133 views (last 30 days)
In the past, I could use installed third-party fonts inside MATLAB. After upgrading to Windows version 1809 (OS build: 17763.194) though, newly installed fonts do not show in MATLAB.I tested this by deleting one font 'Bitstream Vera Sans Mono' which previously displayed in MATLAB, and then installing it again. MATLAB does not show the re-installed font.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Feb 2022
Edited: MathWorks Support Team on 25 Feb 2022
The font picker issue arose because Windows 10 version 1809 added a feature which allows a font to be installed only for a specific user rather than for all users. This caused inconsistency in the Java API, which retrieves the list of all the fonts for a specific user.
There are 2 workarounds for this issue.
Workaround-1: Install the font for all users.
To install the font for all users, right-click the font and select 'Install for all users'.
The font becomes visible for all users in font picker.
Workaround-2: Copy the font to /jre/lib/fonts folder.
To copy the font to the /jre/lib/fonts folder of your system's Java install location, follow these steps:
1. Run this code in MATLAB to determine the /jre/lib/fonts folder location.
fullfile(java.lang.System.getProperty('java.home').toCharArray', 'lib', 'fonts')
2. Manually copy the font file to the /jre/lib/fonts folder.
Alternatively, you can run this command in MATLAB:
copyfile('\path\to\font\file\font.ttf', fullfile(java.lang.System.getProperty('java.home').toCharArray', 'lib', 'fonts')) % Replace 'path\to\font\file\font.ttf' with the location of the font file.
3. Verify that the font was successfully copied by running the following code in MATLAB.
dir(fullfile(java.lang.System.getProperty('java.home').toCharArray', 'lib', 'fonts'))
4. Restart MATLAB. The copied font is now visible in the font picker.

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Tags

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!