MATLAB Answers

What font do you code in?

479 views (last 30 days)
Chad Greene
Chad Greene on 27 Mar 2015
Answered: IronDay on 24 Oct 2020
What font do you use for coding? Clearly the best typeface for coding is Curlz MT, but are there any others? I'm looking for readability and easy 1, l and 0, O distinction.

  5 Comments

Show 2 older comments
John D'Errico
John D'Errico on 27 Mar 2015
A font of wisdom, hoping that it helps.
Chad Greene
Chad Greene on 27 Mar 2015
This gives me an idea: Commented text automatically changes color; why not let the comment font automatically switch to something more compact and easy to read?
Simon Tupin
Simon Tupin on 15 Nov 2020 at 6:46
Yes, would love to use Victor Mono and get cursive italics in the comments!
https://rubjo.github.io/victor-mono/

Sign in to comment.

Answers (8)

Star Strider
Star Strider on 27 Mar 2015
I use Consolas (Windows) for Editor and Command Window fonts. It’s a fixed-width sans-serif font with a slant-through zero and easily recognisable letters and symbols. I don’t have Curlz MT on this machine, so I can’t compare them.

  0 Comments

Sign in to comment.


Stephen Cobeldick
Stephen Cobeldick on 27 Mar 2015
Edited: Stephen Cobeldick on 27 Mar 2015
Some resources that might be of interest:
It seems that Consolas gets mentioned a lot on these various forums.

  0 Comments

Sign in to comment.


Trong Nguyen Van
Trong Nguyen Van on 4 Oct 2016
I'm using Consolas with size 11. Because, i get used to coding with this font on Visual or CodeBlocks. My matlab doesn't support Curlz MT.

  0 Comments

Sign in to comment.


Jan
Jan on 13 Aug 2020
Andale Mono and Bitstream Vera Sans Mono.

  3 Comments

Les Beckham
Les Beckham on 14 Aug 2020
+1 for Bitstream Vera Sans Mono. I've been using that for a long time. Haven't seen Andale Mono. Might have to give it a look.
Les Beckham
Les Beckham on 14 Aug 2020
Just wondering. Why do you mention two different preferences? Why not just stick with one?
Jan
Jan on 16 Aug 2020
@Lex Beckham: On screens with a low resolution, I need a smaller font to keep the same number of lines in the window. Then I prefer Andale Mono. With a higher resolution Bitstream is my favourite.

Sign in to comment.


Jaber Gharib
Jaber Gharib on 8 May 2018
The best ids Consolas I suppose

  0 Comments

Sign in to comment.


Carey Smith
Carey Smith on 13 Aug 2020
I prefer Lucida Console: You can tell the differences between 1l & I, and 0 and O.
Plus it's mon-spaced, so code indentation lines up and number arrays line up.

  0 Comments

Sign in to comment.


John D'Errico
John D'Errico on 13 Aug 2020
Edited: John D'Errico on 16 Aug 2020
Personally, I like a font that puts a slash of some sort through the zeros. Without that, the zero and uppercase O seem too close to me, too easy to mistake. You also need fonts with a serif, as that really helps to distinguish betweel a lower case l, the number 1, and an upper case I, even lower case i.
Monaco is my choice. And monospaced is really important for coding. Never program in a proportionally spaced font.

  2 Comments

Les Beckham
Les Beckham on 14 Aug 2020
I was going to disagree about the need for a serif font as I prefer Bitstream Vera Sans Mono. Looking at it more carefully convinces me that this is not really a sans serif font. It just uses them where they are really needed for character differentiation, rather than for 'decoration'. Actually it has a lot more serifs than I would expect (for example the lower case i). It is easy to read though. It does have good differentiation betweeen O and 0 (a dot in the middle of the zero).
Of course monospace is essential.
John D'Errico
John D'Errico on 16 Aug 2020
I went back, and after a fair amount of play with every choice of font I had, I find my preference to be strongly just plain old Monaco. Monospaced. Nice distinction between the letters and numbers in question.

Sign in to comment.


IronDay
IronDay on 24 Oct 2020
Fonts: Seorgio UI Plain
size: 12

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!