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 Live Editor code font name to 'Times New Roman'
(where
the default is 'Monospaced'
).
s = settings;
s.matlab.fonts.editor.code.Name.TemporaryValue = 'Times New Roman'
For more information about settings, see Access and Modify Settings.
matlab.fonts.editor.code
Name
— Live Editor code font name
'Monospaced'
(default) | character vector
Live Editor code font name, specified as a character vector. To get the
list of available system fonts, use the listfonts
function.
Example: s.matlab.fonts.editor.code.Name.TemporaryValue =
'Arial'
Style
— Live Editor code font style
'plain'
(default) | 'bold'
| 'italic'
| ["bold,"italic"]
Live Editor code font style, specified as 'plain'
,
'bold'
, 'italic'
, or
["bold,"italic"]
. To specify bold italic text, use
["bold","italic"]
.
Example: s.matlab.fonts.editor.code.Style.TemporaryValue =
'bold'
Example: s.matlab.fonts.editor.code.Style.TemporaryValue =
["bold","italic"]
Size
— Live Editor code font size
'14px'
(default) | positive integer | string scalar | character vector
Live Editor code font size, specified as one of the following:
A positive integer representing the size of the font in points, in the range
[0,100]
.A string scalar or character vector representing the size of the font in points. The string scalar or character vector represents a number in the range
[0,100]
followed by'pt'
. For example,'15pt'
.A string scalar or character vector representing the size of the font in pixels. The string scalar or character vector represents a number in the range
[0,133]
followed by'px'
. For example,'30px'
.
Example: s.matlab.fonts.editor.code.Size.TemporaryValue =
'26px'
Example: s.matlab.fonts.editor.code.Size.TemporaryValue =
'16pt'
Example: s.matlab.fonts.editor.code.Size.TemporaryValue =
12
Color
— Live Editor code font color
[0 0 0 1]
(default) | three-element vector | four-element vector
Live Editor code font color, specified as a three-element vector or a four-element vector.
The first three elements in the vector specify the intensities of the red,
green, and blue components of the color. The intensities must be in the
range [0,255]
; for example, [100 80
60]
.
If there is a fourth element, it specifies the transparency of the color.
The transparency value must be in the range [0,1]
. A
value of 1
is fully opaque and 0
is
completely transparent.
Example: s.matlab.fonts.editor.code.Color.TemporaryValue = [0 10
255]
Example: s.matlab.fonts.editor.code.Color.TemporaryValue = [255
100 0 .5]
matlab.fonts.editor.normal
Name
— Live Editor normal font name
'SansSerif'
(default) | character vector
Live Editor normal font name, specified as a character vector. To get the
list of available system fonts, use the listfonts
function.
Example: s.matlab.fonts.editor.normal.Name.TemporaryValue =
'Arial'
Style
— Live Editor normal font style
'plain'
(default) | 'bold'
| 'italic'
| ["bold,"italic"]
Live Editor normal font style, specified as 'plain'
,
'bold'
, 'italic'
, or
["bold,"italic"]
. To specify bold italic text, use
["bold","italic"]
.
Example: s.matlab.fonts.editor.normal.Style.TemporaryValue =
'bold'
Example: s.matlab.fonts.editor.normal.Style.TemporaryValue =
["bold","italic"]
Size
— Live Editor normal font size
'14px' (default) | positive integer | string scalar | character vector
Live Editor normal font size, specified as one of the following:
A positive integer representing the size of the font in points, in the range
[0,100]
.A string scalar or character vector representing the size of the font in points. The string scalar or character vector represents a number in the range
[0,100]
followed by'pt'
. For example,'15pt'
.A string scalar or character vector representing the size of the font in pixels. The string scalar or character vector represents a number in the range
[0,133]
followed by'px'
. For example,'30px'
.
Example: s.matlab.fonts.editor.normal.Size.TemporaryValue =
'26px'
Example: s.matlab.fonts.editor.normal.Size.TemporaryValue =
'16pt'
Example: s.matlab.fonts.editor.normal.Size.TemporaryValue =
12
Color
— Live Editor normal font color
[0 0 0 1]
(default) | three-element vector | four-element vector
Live Editor normal font color, specified as a three-element vector or a four-element vector.
The first three elements in the vector specify the intensities of the red,
green, and blue components of the color. The intensities must be in the
range [0,255]
; for example, [100 80
60]
.
If there is a fourth element, it specifies the transparency of the color.
The transparency value must be in the range [0,1]
. A
value of 1
is fully opaque and 0
is
completely transparent.
Example: s.matlab.fonts.editor.normal.Color.TemporaryValue = [0 10
255]
Example: s.matlab.fonts.editor.normal.Color.TemporaryValue = [255
100 0 .5]
matlab.fonts.editor.heading1
Name
— Live Editor heading 1 font name
'SansSerif'
(default) | character vector
Live Editor heading 1 font name, specified as a character vector. To get
the list of available system fonts, use the listfonts
function.
Example: s.matlab.fonts.editor.heading1.Name.TemporaryValue =
'Arial'
Style
— Live Editor heading 1 font style
'bold'
(default) | 'plain'
| 'italic'
| ["bold,"italic"]
Live Editor heading 1 font style, specified as 'plain'
,
'bold'
, 'italic'
, or
["bold,"italic"]
. To specify bold italic text, use
["bold","italic"]
.
Example: s.matlab.fonts.editor.heading1.Style.TemporaryValue =
'bold'
Example: s.matlab.fonts.editor.heading1.Style.TemporaryValue =
["bold","italic"]
Size
— Live Editor heading 1 font size
'20px' (default) | positive integer | string scalar | character vector
Live Editor heading 1 font size, specified as one of the following:
A positive integer representing the size of the font in points, in the range
[0,100]
.A string scalar or character vector representing the size of the font in points. The string scalar or character vector represents a number in the range
[0,100]
followed by'pt'
. For example,'15pt'
.A string scalar or character vector representing the size of the font in pixels. The string scalar or character vector represents a number in the range
[0,133]
followed by'px'
. For example,'30px'
.
Example: s.matlab.fonts.editor.heading1.Size.TemporaryValue =
'26px'
Example: s.matlab.fonts.editor.heading1.Size.TemporaryValue =
'16pt'
Example: s.matlab.fonts.editor.heading1.Size.TemporaryValue =
12
Color
— Live Editor heading 1 font color
[60 60 60 1]
(default) | three-element vector | four-element vector
Live Editor heading 1 font color, specified as a three-element vector or a four-element vector.
The first three elements in the vector specify the intensities of the red,
green, and blue components of the color. The intensities must be in the
range [0,255]
; for example, [100 80
60]
.
If there is a fourth element, it specifies the transparency of the color.
The transparency value must be in the range [0,1]
. A
value of 1
is fully opaque and 0
is
completely transparent.
Example: s.matlab.fonts.editor.heading1.Color.TemporaryValue = [0
10 255]
Example: s.matlab.fonts.editor.heading1.Color.TemporaryValue =
[255 100 0 .5]
matlab.fonts.editor.heading2
Name
— Live Editor heading 2 font name
'SansSerif'
(default) | character vector
Live Editor heading 2 font name, specified as a character vector. To get
the list of available system fonts, use the listfonts
function.
Example: s.matlab.fonts.editor.heading2.Name.TemporaryValue =
'Arial'
Style
— Live Editor heading 2 font style
'bold'
(default) | 'plain'
| 'italic'
| ["bold,"italic"]
Live Editor heading 2 font style, specified as 'plain'
,
'bold'
, 'italic'
, or
["bold,"italic"]
. To specify bold italic text, use
["bold","italic"]
.
Example: s.matlab.fonts.editor.heading2.Style.TemporaryValue =
'bold'
Example: s.matlab.fonts.editor.heading2.Style.TemporaryValue =
["bold","italic"]
Size
— Live Editor heading 2 font size
'17px' (default) | positive integer | string scalar | character vector
Live Editor heading 2 font size, specified as one of the following:
A positive integer representing the size of the font in points, in the range
[0,100]
.A string scalar or character vector representing the size of the font in points. The string scalar or character vector represents a number in the range
[0,100]
followed by'pt'
. For example,'15pt'
.A string scalar or character vector representing the size of the font in pixels. The string scalar or character vector represents a number in the range
[0,133]
followed by'px'
. For example,'30px'
.
Example: s.matlab.fonts.editor.heading2.Size.TemporaryValue =
'26px'
Example: s.matlab.fonts.editor.heading2.Size.TemporaryValue =
'16pt'
Example: s.matlab.fonts.editor.heading2.Size.TemporaryValue =
12
Color
— Live Editor heading 2 font color
[60 60 60 1]
(default) | three-element vector | four-element vector
Live Editor heading 2 font color, specified as a three-element vector or a four-element vector.
The first three elements in the vector specify the intensities of the red,
green, and blue components of the color. The intensities must be in the
range [0,255]
; for example, [100 80
60]
.
If there is a fourth element, it specifies the transparency of the color.
The transparency value must be in the range [0,1]
. A
value of 1
is fully opaque and 0
is
completely transparent.
Example: s.matlab.fonts.editor.heading2.Color.TemporaryValue = [0
10 255]
Example: s.matlab.fonts.editor.heading2.Color.TemporaryValue =
[255 100 0 .5]
matlab.fonts.editor.heading3
Name
— Live Editor heading 3 font name
'SansSerif'
(default) | character vector
Live Editor heading 3 font name, specified as a character vector. To get
the list of available system fonts, use the listfonts
function.
Example: s.matlab.fonts.editor.heading3.Name.TemporaryValue =
'Arial'
Style
— Live Editor heading 3 font style
'bold'
(default) | 'plain'
| 'italic'
| ["bold,"italic"]
Live Editor heading 3 font style, specified as 'plain'
,
'bold'
, 'italic'
, or
["bold,"italic"]
. To specify bold italic text, use
["bold","italic"]
.
Example: s.matlab.fonts.editor.heading3.Style.TemporaryValue =
'bold'
Example: s.matlab.fonts.editor.heading3.Style.TemporaryValue =
["bold","italic"]
Size
— Live Editor heading 3 font size
'15px' (default) | positive integer | string scalar | character vector
Live Editor heading 3 font size, specified as one of the following:
A positive integer representing the size of the font in points, in the range
[0,100]
.A string scalar or character vector representing the size of the font in points. The string scalar or character vector represents a number in the range
[0,100]
followed by'pt'
. For example,'15pt'
.A string scalar or character vector representing the size of the font in pixels. The string scalar or character vector represents a number in the range
[0,133]
followed by'px'
. For example,'30px'
.
Example: s.matlab.fonts.editor.heading3.Size.TemporaryValue =
'26px'
Example: s.matlab.fonts.editor.heading3.Size.TemporaryValue =
'16pt'
Example: s.matlab.fonts.editor.heading3.Size.TemporaryValue =
12
Color
— Live Editor heading 3 font color
[60 60 60 1]
(default) | three-element vector | four-element vector
Live Editor heading 3 font color, specified as a three-element vector or a four-element vector.
The first three elements in the vector specify the intensities of the red,
green, and blue components of the color. The intensities must be in the
range [0,255]
; for example, [100 80
60]
.
If there is a fourth element, it specifies the transparency of the color.
The transparency value must be in the range [0,1]
. A
value of 1
is fully opaque and 0
is
completely transparent.
Example: s.matlab.fonts.editor.heading3.Color.TemporaryValue = [0
10 255]
Example: s.matlab.fonts.editor.heading3.Color.TemporaryValue =
[255 100 0 .5]
matlab.fonts.editor.title
Name
— Live Editor title font name
'SansSerif'
(default) | character vector
Live Editor title font name, specified as a character vector. To get the
list of available system fonts, use the listfonts
function.
Example: s.matlab.fonts.editor.title.Name.TemporaryValue =
'Arial'
Style
— Live Editor title font style
'plain'
(default) | 'bold'
| 'italic'
| ["bold,"italic"]
Live Editor title font style, specified as 'plain'
,
'bold'
, 'italic'
, or
["bold,"italic"]
. To specify bold italic text, use
["bold","italic"]
.
Example: s.matlab.fonts.editor.title.Style.TemporaryValue =
'bold'
Example: s.matlab.fonts.editor.title.Style.TemporaryValue =
["bold","italic"]
Size
— Live Editor title font size
'24px' (default) | positive integer | string scalar | character vector
Live Editor title font size, specified as one of the following:
A positive integer representing the size of the font in points, in the range
[0,100]
.A string scalar or character vector representing the size of the font in points. The string scalar or character vector represents a number in the range
[0,100]
followed by'pt'
. For example,'15pt'
.A string scalar or character vector representing the size of the font in pixels. The string scalar or character vector represents a number in the range
[0,133]
followed by'px'
. For example,'30px'
.
Example: s.matlab.fonts.editor.title.Size.TemporaryValue =
'26px'
Example: s.matlab.fonts.editor.title.Size.TemporaryValue =
'16pt'
Example: s.matlab.fonts.editor.title.Size.TemporaryValue =
12
Color
— Live Editor title font color
[213 80 0 1]
(default) | three-element vector | four-element vector
Live Editor title font color, specified as a three-element vector or a four-element vector.
The first three elements in the vector specify the intensities of the red,
green, and blue components of the color. The intensities must be in the
range [0,255]
; for example, [100 80
60]
.
If there is a fourth element, it specifies the transparency of the color.
The transparency value must be in the range [0,1]
. A
value of 1
is fully opaque and 0
is
completely transparent.
Example: s.matlab.fonts.editor.title.Color.TemporaryValue = [0 10
255]
Example: s.matlab.fonts.editor.title.Color.TemporaryValue = [255
100 0 .5]
matlab.fonts.codefont
Name
— Desktop code font name
'Monospaced'
(default) | character vector
Desktop code font name, specified as a character vector. This is the name
of the font that displays for all code tools in the MATLAB desktop. To get the list of available system fonts, use the
listfonts
function.
Example: s.matlab.fonts.codefont.Name.TemporaryValue =
'Arial'
Style
— Desktop code font style
0
(default) | 1
| 2
| 3
Desktop code font style, specified as the positive integer
0
, 1
, 2
, or
3
. This is the style of the font that displays for
all code tools in the MATLAB desktop.
The values are defined as follows:
0
— Plain1
— Bold2
— Italic3
— Bold Italic
Example: s.matlab.fonts.codefont.Style.TemporaryValue =
1
Size
— Desktop code font size
10 (default) | positive integer
Desktop code font size, specified as a positive integer. This is the size of the font that displays for all code tools in the MATLAB desktop.
Example: s.matlab.fonts.codefont.Size.TemporaryValue =
12
Version History
Introduced in R2018a