MATLAB Answers

Changing Matlab UI font from Lucida Sans / Grande?

40 views (last 30 days)
Richard Lane
Richard Lane on 18 Dec 2020
Answered: Richard Lane on 21 Dec 2020
is there a way to switch the font used by Matlab in the UI? I don't mean the two options in preferences that you can already change, but the one used in the toolbars, menus etc.
I can see by looking in the jvm folder that Lucida Sans, Lucida Bright, and Lucida Typewriter are probably being used. However, if I replace these with other fonts using the same names, Matlab doesn't change at all. Even if I don't have Lucida anywhere else on my system!
I am running Matlab on Linux.

  0 Comments

Sign in to comment.

Answers (2)

Saurav Chaudhary
Saurav Chaudhary on 21 Dec 2020
MATLAB determines the set the fonts used in font preferences from the fonts installed on your system. MATLAB looks for fonts in these locations:
  • The operating system's standard location (see your system administrator for details)
  • The /jre/lib/fonts folder where Java® software is installed on your system
MATLAB only includes compatible fonts in the font preferences.
  • For desktop components (such as the Command Window), figure windows, and uicontrols, fonts must be compatible with TrueType and Microsoft OpenType® fonts
  • For graphics objects, such as xlabel, ylabel, title, and text, fonts must be TrueType and Microsoft OpenType fonts
If you install a font with MATLAB running, restart MATLAB to include the font in the font preferences. A common reason to install additional fonts is to read files created in different languages. For details on adding fonts to your system, refer to the documentation for your system.
Also, you can go through Change Fonts for more information.
Hope, this helps.

  0 Comments

Sign in to comment.


Richard Lane
Richard Lane on 21 Dec 2020
hi,
Unfortunately that doesn't anwer my question. I would like change the font in the ribbon along the top of the Matlab window which is not accessible through the Preferences. I notice that on Windows and Mac this font looks quite nice, but it is ugly on Linux even with anti-aliasing turned on.
I can see by looking carefully at the letters that this is Lucida Sans. The only place this is installed on my computer is in MATLAB/sys/java/jre/glnxa64/jre/lib/fonts. However changing LucidaSansRegular.ttf for a different font with the same file name doesn't change the ribbon at all.
This leads me to believe that perhaps, on Linux, the ribbon font is somehow hard-coded into the Matlab executable?

  0 Comments

Sign in to comment.

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by