The new font from JetBrains is optimized for code.
Free and open source
JetBrains Mono. A typeface for developers_
"Consider this in contrast to some other fonts. Consolas, for example, has slightly wider letters. However, they are still rather small, which forces you to increase the size by one point to make the font more readable. As a result, lines of code tend to run longer than expected.
JetBrains Mono’s standard-width letters help keep lines to the expected length."