matlab.fonts Settings

Code font settings

The default font that MATLAB uses for a particular tool depends upon its content. You can change the default font using the matlab.fonts settings. Access matlab.fonts using the root SettingsGroup object returned by the settings function. For example, set the temporary value for the code font name to 'Times New Roman' (where the default is 'Monospaced').

s = settings;
s.matlab.fonts.codefont.Name.TemporaryValue = 'Times New Roman'

For more information about settings, see Access and Modify Settings.

matlab.fonts.codefont

Code font name, specified as a character vector.

Example: s.matlab.fonts.codefont.Name.TemporaryValue = 'Arial'

Code font style, specified as the positive integer 0, 1, 2, or 3.

The values are define as follows:

  • 0 — Plain

  • 1 — Bold

  • 2 — Italic

  • 3 — Bold Italic

Example: s.matlab.fonts.codefont.Style.TemporaryValue = 1

Code font size, specified as a positive integer.

Example: s.matlab.fonts.codefont.Size.TemporaryValue = 12

matlab.fonts.editor.codefont

App designer code font size that displays in App Designer Code View, specified as a positive integer between 14 and 48.

Example: s.matlab.fonts.editor.codefont.Size.TemporaryValue = 20

Introduced in R2018a