Can I change the code font in Live Editor?

24 views (last 30 days)
I would like to change the code font in Live editor by using "Preferences".

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 13 Jun 2022
Edited: MathWorks Support Team on 13 Jun 2022
From R2021a, you can change the code font in Live editor programmatically.
Example:
s = settings;
s.matlab.fonts.editor.code.Name.TemporaryValue = 'MS UI Gothic'; 
s.matlab.fonts.editor.normal.Name.TemporaryValue = 'MS UI Gothic';
s.matlab.fonts.editor.heading1.Name.TemporaryValue = 'MS UI Gothic';
For details, please refer following documentation pages.
・matlab.fonts settings
・Access and Modify Settings

More Answers (1)

Julie Shapiro
Julie Shapiro on 10 Jul 2025
Starting in R2024b, you can customize the font, size, color, and formatting of text and code styles in the Live Editor using the Customize Styles dialog box.
To customize a text or code style, go to the Live Editor tab, and in the Text section, click the Customize styles button. Then, select the style that you want to customize and change the font, size, color, and formatting for the selected style.
For more information, see Format Text in the Live Editor.

Categories

Find more on Live Scripts and Functions in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!