Change Fonts

Font Preferences

Change the font for desktop tools using the Fonts Preferences dialog. Access this dialog on the Home tab, in the Environment section, by clicking Preferences. Select MATLAB > Fonts.

The default font that MATLAB® uses for a particular tool depends upon its content:

  • Code tools, such as the Command Window and Editor, use a monospaced font to preserve vertical alignment.

  • Text-based tools, such as the Current Folder browser, use your system's font.

  • A few specific tools, including the Profiler, use a custom proportional font.

You can change the font for the group of code tools, for the group of text-based tools, or for individual tools. To change the font for an individual tool, or to move a tool from one group to another, click Custom Fonts and set the preferences for that tool.

This table describes the factory defaults for each group of tools. Refer to this table to restore fonts to their original state.

Font Group

Factory Defaults

Default Font Group Tools

Desktop code font

Monospaced, Plain, 10 point

Command History

Command Window

Editor (and Shortcuts Editor)

Desktop text font

Your system's current font

Current Folder browser (and Path browser)

Workspace browser

Variables editor

Function Browser

Custom fonts

SansSerif, Plain, 10 point

Profiler (and Code Analyzer messages, Function Browser help, and Supplemental Software help)

    Note:   For the Profiler, you can change the font type and size, but not the style (for example, bold or italic).

UNIX®[1] systems include a preference to apply antialiasing: Use antialiasing to smooth desktop fonts. Select this preference for a smoother desktop appearance. You must restart MATLAB for the preference to take effect. This option is not provided on Microsoft® Windows® or Apple Macintosh platforms, because MATLAB follows the operating system's font settings on these platforms.

Help and Web Browser Fonts

To adjust the font size in the Help browser or MATLAB Web browser, right-click on the page and select Zoom In or Zoom Out. You cannot change the font type or style.

Adding Fonts on Windows Systems

MATLAB determines the set of fonts for the Preferences dialog from your system settings on the first use of fonts within a session.

If, during a MATLAB session, you install a font that MATLAB can use, restart MATLAB to include it in the list. 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 Microsoft Windows help.

If MATLAB cannot display a particular font, it excludes that font from the list. The criteria for compatible fonts are as follows:

  • For desktop components (such as the Command Window), figure windows, and uicontrols — Fonts compatible with TrueType and Microsoft OpenType® fonts

  • For graphics objects, such as xlabel, ylabel, title, and text — TrueType and Microsoft OpenType fonts

MATLAB looks for fonts in the following 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

Related Examples


[1] UNIX is a registered trademark of The Open Group in the United States and other countries.

Was this topic helpful?