Cannot find font file

조회 수: 21 (최근 30일)
Cedric
Cedric 2025년 2월 6일
댓글: Douglas 2025년 8월 18일
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)

답변 (1개)

Aravind
Aravind 2025년 2월 10일
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
Douglas
Douglas 2025년 8월 18일
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'

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

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by