Cannot find font file

I am using MATLAB 2022. I have installed the font file, rebooted etc and it still does not find Linux Biolinum. I don't have the admin rights to install to all users (I forgot how I installed this font but it was a while ago, I think it's just to my user)

Respuestas (1)

Aravind
Aravind el 10 de Feb. de 2025

0 votos

The font picker issue arises because newer versions of Windows 10 and 11 allow fonts to be installed for a specific user rather than for all users, leading to inconsistencies in the Java API that retrieves fonts. There are two workarounds for this issue:
Workaround 1: Install the Font for All Users
  • Right-click the font file and select 'Install for all users.' This action may require administrative privileges.
  • This will make the font visible to all users in the font picker.
Workaround 2: Copy the Font to the “/jre/lib/fonts” Folder
  • Run the following code in MATLAB to find the location of the “/jre/lib/fonts” folder:
fullfile(java.lang.System.getProperty('java.home').toCharArray', 'lib', 'fonts')
  • Manually copy the font file to the “/jre/lib/fonts” folder, or use this MATLAB command:
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 actual path to your font file.
  • Verify the font was copied successfully by running:
dir(fullfile(java.lang.System.getProperty('java.home').toCharArray', 'lib', 'fonts'))
  • Restart MATLAB. The copied font should now be visible in the font picker.
For more information on adding custom fonts, you can visit: https://www.mathworks.com/help/matlab/matlab_env/change-fonts.html#bs1u_xt-12.
I hope this helps!

1 comentario

Douglas
Douglas el 18 de Ag. de 2025
This is really a ridiculously unhelpful response. The fonts are most likely installed only for a single user because said user lacks admin privileges, which means he also cannot copy the fonts to, for example, 'C:\Program Files\MATLAB\R2024b\sys\java\jre\win64\jre\lib\fonts'

Iniciar sesión para comentar.

Categorías

Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.

Productos

Versión

R2022b

Etiquetas

Preguntada:

el 6 de Feb. de 2025

Comentada:

el 18 de Ag. de 2025

Community Treasure Hunt

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

Start Hunting!

Translated by