Changing the font size in MATLAB® depends on the tool. This table describes how to change the font size for each tool in MATLAB.
To change the font size for charts, see Add Title and Axis Labels to Chart.
Tool | Procedure |
---|---|
Live Editor | Use the Ctrl + Plus (+) and Ctrl + Minus (-) keyboard shortcuts. |
Code tools
| On the Home tab, in the
Environment section, click |
Text-based tools
| On the Home tab, in the
Environment section, click |
Help Browser MATLAB web browser | Use the Ctrl + Plus (+) and Ctrl + Minus (-) keyboard shortcuts. |
In MATLAB Online™, you only can change the font size for the Editor.
Changing the font name and style in MATLAB depends on the tool. This table describes how to change the font name and style for each tool in MATLAB.
Tool | Procedure |
---|---|
Live Editor | Changing the font name and style is not supported. |
Code tools
| On the Home tab, in the
Environment section, click |
Text-based tools
| On the Home tab, in the
Environment section, click |
Help Browser MATLAB web browser | Changing the font name and style is not supported. |
In MATLAB Online, you only can change the font name and style for the Editor.
To apply antialiasing and create a smoother desktop appearance on UNIX® systems, select Use antialiasing to smooth desktop fonts. You must restart MATLAB for the preference to take effect. On Microsoft® Windows® and Macintosh platforms, MATLAB uses system setting for antialiasing.
You can further customize fonts in MATLAB by changing the font preferences for an individual tool. On the
Home tab, in the Environment section, click
Preferences. Select MATLAB > Fonts > Custom. Then, select a tool from the list of Desktop
tools and specify the Font to use:
Desktop code — Specify this option to use the desktop code font for this tool.
Desktop text — Specify this option to use the desktop text font for this tool.
Custom — Specify this option to specify a custom font for this tool. Then, specify a font name, style, and size.
For example, to change the Editor font to a custom font, in the list of Desktop tools, select Editor. Then, in the Font to use section, select Custom and specify the desired font name, style, and size.
Some tools, such as the Profiler, use a custom font by default.
For the Profiler, you can change the font type and size, but not the style (for example, bold or italic).
This table shows the default font preferences for tools in MATLAB. Use this table to restore fonts to their original state.
Tool | Font to Use | Default Font |
---|---|---|
Command History | Desktop code | Monospaced, Plain, 10 point |
Command Window | ||
Editor (and Shortcuts Editor) | ||
Current Folder browser (and Path browser) | Desktop text | Your system's current font |
Workspace browser | ||
Variables editor | ||
Function Browser | ||
Profiler | Custom |
|
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.