Alex Kutas' blog.

I switched to a non-monospace font for IDE

Two weeks ago, I switched to using non-monospace font in my IDE. I didn't have a specific reason; I simply wanted to see if it would work.

So, it works. Ask yourself "Why do we use monospace font for development?" I believe there is no particular reason, it just happened to be so historically.


Code indentation will be broken. Nope, for most of the languages indentation and line breaks are the only formatting characters used. So while all spacing is at the beginning of the line, it is consistent and indentation does not break. There are some potential alignment issues, for my case if I want to use markdown table and align it using prettier, it won't work. For some languages there may be conventions that won't work either. But I believe for most of the languages it is not an issue.

I cannot distinguish between similarly looking characters. In fact, it is not an issue. At least so far I didn't encounter it. Even if letters are similarly looking, those are distinguished by the context. Most of the code is like text, function names and text variables are easily readable. Things like tokens and password where those character are mixed without context are usually copy pasted and not entered. So for these cases it is not an issue either.

Any benefit?

Readability is actually much better in proportional fonts. Text is denser, so longer names for functions and variables are easier to read. And it just looks better frankly.

What would I improve

There are some specific characters I wish were more tuned for programming. Like in the font I use I want comma, colons and dot to be a little bit bigger, these are too subtle in Segoe UI.

I also wish I could adjust visual size of space. I switched to 4 spaces as indentation for my project. For those I don't own I just use it as is.

It also seems to me that performance is a little bit worse in VSCode at least. And I imagine that some code editors may not support proportional fonts.

I could not find where I can turn on or turn off font features like tabular nums. Maybe I just overlooked this configuration somewhere.

Try it

I am pretty happy with it, so I am going to stay with non-monospace fonts. Maybe you should try it as well. Just give it a day and then decide for yourself.

BTW, I use "Verdana" on Mac and "Segoe UI" on Windows. I haven't found anything better yet but I am open to suggestions.