Main Content

Zoom and Change Desktop Fonts

You can adjust the zoom level in the Editor and Live Editor as well as the size, name, and style of the desktop code font. You also can install new code fonts to use with MATLAB®.

Adjust Zoom Level

You can change the zoom level of the Editor or Live Editor by going to the View tab and selecting Zoom In, Zoom Out, or Reset Zoom. Alternatively, you can change the zoom level using the Ctrl+Mouse Scroll keyboard shortcut or the Ctrl+Plus (+) and Ctrl+Minus (–) keyboard shortcuts. To reset the zoom level, use the Ctrl+Alt+0 keyboard shortcut. On macOS systems, use the Command key instead of the Ctrl key.

The current Editor and Live Editor zoom level displays at the bottom-right corner of the MATLAB desktop.

Bottom-right corner of the MATLAB desktop showing the current Editor zoom level as 125 percent

To configure the zoom behavior of the Editor and Live Editor, go to the Home tab, and in the Environment section, click Settings. Then, select MATLAB > Editor/Debugger > Display and in the General display options section, adjust these settings:

  • Disable zooming with Ctrl+Mouse Scroll — Clear the Enable zooming with Ctrl+Scroll check box. When this setting is cleared, you can still use Ctrl+Plus (+) and Ctrl+Minus (–) to zoom in and out.

  • Only zoom in and out of the current file — Select the Enable zooming for individual files check box. When this setting is selected, changing the zoom level affects only the current file open in the Editor or Live Editor.

In MATLAB Online™, you also can change the zoom level of the entire desktop by adjusting the zoom settings for your web browser.

Change Font

You can change the font size, name, and style for code-based tools in MATLAB, including the Editor, Command Window, Command History, and Live Editor. You also can change the font for charts.

Changing the font size, name, and style for text-based tools such as the Files panel, Workspace panel, and Variables editor is not supported.

ToolInstructions

Editor

Command Window

Command History

To change the code font in the Editor, Command Window, and Command History, go to the Home tab, and in the Environment section, click Settings. Then, select MATLAB > Appearance > Fonts and, in the Desktop code font section, select a font name, style, and size.

Before R2025a: Select MATLAB > Fonts instead.

Live Editor

To change the code font in the Live Editor, go to the Live Editor tab, and in the Text section, click the text style drop-down menu and select Customize styles.

Before R2024b: Use matlab.fonts Settings.

For more information, see Change Fonts and Colors.

Charts

See Add Title and Axis Labels to Chart.

Default Code Font

The default code font in MATLAB is monospaced, plain, and 10 point. You can use these values to restore fonts to their original state.

When the font is set to monospaced, the actual displayed font in the Editor is different than the font displayed in the Command Window and Command History. The reason is that monospaced is a logical font, not a physical font. To avoid this discrepancy, specify the font name as a physical font, for example, Courier New.

Add Additional Fonts

You can add additional fonts to use in MATLAB. A common reason for adding additional fonts is to read files created in different languages.

To add a new font to use in MATLAB:

  1. Choose a font. The font must be compatible with MATLAB. MATLAB includes only compatible fonts in the font settings.

    • For desktop components (such as the Command Window), figure windows, and UI controls, 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.

  2. Install the font. For details on installing fonts on your system, refer to the documentation for your system.

  3. Restart MATLAB.

  4. Go to the Home tab, and in the Environment section, click Settings. Then, select MATLAB > Appearance > Fonts and manually enter the new font name in the Desktop code font drop-down list.

Before R2025a: Install the font in the \jre\lib\fonts folder where Java® software is installed on your system, for example, C:\Program Files\MATLAB\R2024a\sys\java\jre\win64\jre\lib\fonts. Then, use the font in MATLAB by selecting it in the MATLAB > Fonts settings.

See Also

Topics