As a “code manipulator”, it is the editor and the code itself that face the most every day. It is very important to choose a suitable font, which directly affects the efficiency of our programming and the comfort of our eyes.
There are many popular programming fonts on the Internet, such as hack, dejavu Sans Mono, source code pro, monooki, Consolas, Monaco, etc.
JetBrains, a company affiliated to IntelliJ idea, an integrated development environment, recently quietly launched its own programming font, JetBrains mono, and noted on the official website:
It’s free & open source . JetBrains Mono typeface is available under the Apache 2.0 license and can be used free of charge, for both commercial and non-commercial purposes.
Open source, free and commercial. Would you like to have a try?
What does the new font look like?
What are the specific characteristics?
1. Increase font height and reduce details
The font remains standard in width, but the height of the lowercase letters is raised. This change makes each letter occupy more pixels without changing the length of the lines of code, which helps improve rendering.
The above is the contrast effect chart. In contrast, the font of JetBrains mono is simple, with many unnecessary details removed, and the text looks clearer.
In fact, everyone’s feelings are different. For me, the simpler the shape of characters, the more convenient it is for eyes to recognize them, and the higher the programming efficiency. This is a principle for me to choose fonts.
2. Code hyphenation
A hyphen is a character consisting of two or more connecting symbols. Traditionally, it has been introduced into printed text as a space saving technology. In code, this technique is generally used to display operators, mainly for two purposes:
The first is to reduce the difficulty of code reading by combining symbols and removing details.
In fact, this is not the first programming font with “hyphenation” effect, but the hyphenation of mono is not the same as that of Fira code. At first glance, it looks like oracle bone… It seems that the code has an illusion of ancient programming
But there is also a problem, that is, after ligature, developers who are not used to the font will have reading obstacles, so if it’s a team collaboration project, it’s better to communicate in advance to avoid affecting the overall efficiency of the team.
Another advantage of hyphenation is that it can shorten the code length by moving the glyph, which is not particularly obvious in the use of mono.
How to choose code font?
There are no obvious advantages and disadvantages of programming fonts, but due to the particularity of developers’ work, there are very high requirements for the accuracy of the code, so generally three basic requirements need to be set: equal width, clear display, high character recognition.
In addition, there are only some differences in style, which can be chosen at will according to your own preferences.
After all, no matter how good a font is in the eyes of others, it’s useless if it doesn’t fit your eye, hahahaha
Which font do you usually use? Why?
Appendix: how to download “JetBrains mono”?
If you are using the latest version of JetBrains IDE, you can set it directly in it; if you are using an old version or other IDE, you need to manually download the font installation. Scan the bottom two dimensional code to pay attention to SegmentFault official account, and reply to “Mono” to get the font installation file.