| MATLAB® | ![]() |
| On this page… |
|---|
Desktop Code Font and Desktop Text Font Antialiasing for Desktop Fonts on Linux® and UNIX® Platforms |
Use desktop font preferences to specify the font characteristics for MATLAB® desktop tools. The font characteristics are
Name (also called family or type), for example, select SansSerif
Style, for example, select bold
Size in points, for example, type 11 points
Select File > Preferences > Fonts to set fonts for desktop tools. You can specify the font to be used by all tools that primarily display code such as the Command Window, and specify the font to be used by all other desktop tools. Or you can separately specify the font for any desktop tool.
Select the font characteristics from the lists shown. For font size, not all entries are shown. You can type in a size, including one not shown.
You can set some font options differently for printing — see Printing and Page Setup Options for Desktop Tools.
For information about making additional fonts available to MATLAB, see Making Fonts Available to MATLAB® Tools.

You specify separate font characteristics for tools that primarily display code (Desktop code font), such as the Command Window, and tools that primarily display text (Desktop text font), such as the Current Directory browser. Many users prefer that code display in a monospace font to provide better alignment, and prefer a more narrow font style for text information. With the desktop code font preference, you set just one preference to apply a monospace style to all tools that display code (except the Help and Web Browsers). Similarly, you can set just one preference to apply a text font to all desktop tools that display text.
The following illustrations show how the Editor would look using a monospace font and a proportional font. Note that a monospace font is useful when you care about alignment, but a proportional font uses less space.


Default settings are listed in the following table. Note that Lucida Console approximates the fixedsys font available in earlier versions of MATLAB.
Font Type | Default Characteristics and Sample | Tools Using Font Type by Default |
|---|---|---|
Desktop code font | Monospaced, Plain, 10 point
|
|
Desktop text font | SansSerif, Plain, 10 point
|
|
When you change a font characteristic for Desktop code font, the characteristic takes effect for all tools that use the desktop code font. The same is true when you change a font characteristic for Desktop text font.
After changing a characteristic, a sample in the dialog box shows how it will look. Click Apply or OK to make the change take effect in the desktop tools.
If you do not want to use the current settings for Desktop Code Font and Desktop Text Font, you can specify that a tool use the code font, the text font, or a different font. Select File > Preferences > Fonts. Click + and select Custom. The Fonts Custom Preferences pane appears.

Select a tool from the Desktop tools list. The type of font it uses, code or text, appears under Font to Use. In the illustration shown, the Command Window uses the Desktop code font, which is defined in the Fonts pane as described in the previous section.
To change the font characteristics the selected tool uses, select a different radio button. For Custom, you then specify the font characteristics for that tool.
This example changes the default settings (see Default Font Settings) for the desktop code font, changes the Command History font preference so that it uses the desktop text font instead of the code font, and specifies a custom font for the Current Directory browser:
Change the characteristics for the desktop code font. On the Fonts pane, set the Desktop code font to Times New Roman, Plain, 14 point. Use the default for the Desktop text font, SansSerif, Plain, 10 point. Click Apply.
Make the Command History window use the desktop text font. Select Fonts, click +, select Custom, and then select Command History from Desktop tools. Select the Desktop text radio button.
Apply a custom font to the Current Directory browser. Select Current Directory from Desktop tools. Select the Custom radio button. Select Arial Narrow and Plain, and type 11 in the size field. Click OK.
The following table details the results of the changes.
Tool | Font Type | Font Characteristics |
|---|---|---|
Command Window | Desktop code | Monotype Imaging Times New Roman® font, Plain, 14 point |
Command History | Desktop text | SansSerif, Plain, 10 point |
Editor | Desktop code | Times New Roman font, Plain, 14 point |
Help Navigator | Desktop text | SansSerif, Plain, 10 point |
HTML Proportional Text | Desktop text | SansSerif, Plain, 10 point |
Current Directory | Custom | Monotype Corporation Arial® font, Plain, 11 point |
Workspace | Desktop text | SansSerif, Plain, 10 point |
Variable Editor | Desktop text | SansSerif, Plain, 10 point |
For information about how MATLAB stores preferences and help for other preferences, see Preferences.
To give the desktop a smoother appearance on Linus Torvalds Linux® and The Open Group UNIX® platforms, select the antialiasing preference on the Preference > Fonts pane. The preference apply to all fonts.
Note The antialiasing option is not necessary on Microsoft® Windows® or Apple® Macintosh® platforms, because MATLAB follows the operating system's font settings on these platforms. |
On Windows platforms, desktop components (such as the Command Window and Workspace browser), figure windows, and uicontrols support only Apple TrueType® and Microsoft OpenType® fonts. Some graphics objects can render bitmapped fonts as well, such as xlabel, ylabel, title, and text.
To make a new compatible font available to MATLAB, install the font by selecting Start > Control Panel > Fonts in the Windows desktop, and then selecting File > Install New Font. Restart MATLAB so that it can use the font.
![]() | General Preferences for MATLAB® Application | Colors Preferences for Desktop Tools | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |