What font do you code in?
조회 수: 150 (최근 30일)
이전 댓글 표시
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.
댓글 수: 7
답변 (9개)
Star Strider
2015년 3월 27일
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
Trong Nguyen Van
2016년 10월 4일
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
Jan
2020년 8월 13일
Andale Mono and Bitstream Vera Sans Mono.
댓글 수: 6
Jan
2023년 2월 9일
Install the fonts onyour computer. Under Windows there are 2 options: Install for the current user or for all users with admin privilegs. Matlab does not recognize fonts installed for the current user only, so choose option 2.
Carey Smith
2020년 8월 13일
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
John D'Errico
2020년 8월 13일
편집: John D'Errico
2020년 8월 16일
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.
댓글 수: 3
John D'Errico
2020년 8월 16일
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.
DGM
2022년 11월 2일
I have a fond place in my heart for a crispy 9pt bitmapped Monaco; that said, there are a number of fonts called Monaco that visually have nothing to do with that or each other. I just use whatever the "Monospaced" alias points to (seems to be DejaVu Sans Mono 10). I might like a dot or crossbar on 0, but I'll survive.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!