This past week I became aware that I was naively accepting MATLAB’s default code font, when I should be exploring the vast landscape of programmer fonts available. I finally settled on the gorgeous Bitstream Vera Sans Monspaced font pictured below:
I think this font looks fantastic in MATLAB – I especially like the distinction between the letter “O” ( ) and the digit “0” ( ) (the zero has a tiny dot in it’s center). I find this font much smoother and more elegant to view. I think it even makes me enjoy using MATLAB more!
If you don’t like Bitstream Vera Sans Monospaced, check out some of these other “programmer” fonts:
Once you’ve downloaded the font of your choice, you can change your code font in MATLAB by doing the following:
- Select the File -> Preferences menu item
- Select the Fonts group
- In the Desktop code font section, select a font in the font combo box (pictured below).
You can also change the font for a specific component (e.g. the Editor) by selecting the Custom item under Fonts in the preferences tree. In the Desktop tools section, select the component to change the font for, select the category of font to change (e.g. Desktop code) and finally select a font in the combo box.
For more information on installing fonts check out these links:
What font do you use?
Comments are closed.
12 CommentsOldest to Newest
Ken, should this work with version 7.0 (R14) on Windows? My favorite font is Consolas, but MATLAB seems to do a terrible job of rendering it on screen. In fact, about the only font that doesn’t get butchered is Courier New.
Perhaps there is some other setting I need to tweek?
That’s a nice font. I use “Andale Mono” which has a similar look. I also like the clear distinction it makes between “l” (lower case L) and the number “1”.
If you’re really set on getting Consolas to work you have two options:
1) Upgrade to R2007b or newer (preferred option)
2) Install and run with Java 6 (instruction for this can be found here)
Note, however, that MATLAB is only supported on the version of Java that we ship (1.4.2 for R14SP1).
@Jiro: Andale Mono looks nice! I especially like the rendering of the letter “g”.
Every year or so I try to find a programming font that would really make me happy. A couple of months ago I discovered Bitstream Vera Sans Monospaced, and I really like it. It might just be a keeper.
Ken, thanks for replying @3 and giving such clear instructions on how to get this to work.
No problem Mark…glad to help. Enjoy your font!
The code in Bitstream Vera Sans Monospaced is beautiful and easy to read. But the comments other in English become little square symbols(□) after changed to this font.
In Linux the font hinting is much much too strong. I would love to get light hinting like on OSX. In addition, the pseudo-ClearType LCD-filtering in java is very ugly; It causes color fringes.
Great advice for us beginners! If planning to write comments in other languages Andale Mono can serve that purpose well. If not, I would certainly prefer Bitstream Vera Sans Mono!
very helpful, thank you
Can anyone tell me how to change the font in the Help Window in R2012b?