Sans serif font improves code editor readability

— 1 minute read

In Windows, I often use Courier New font for my code editor since it is the default monospace font which support a decent range of Unicode characters. However, the Courier New is a typewriter-like font which is somehow difficult to read because of its short, broad face with over-emphasized serifs. (Serif: a short line at the end of the main strokes of a character).

In Ubuntu, the default editor font in Eclipse is Monospace which is a sans-serif font. (Sans serif is a type of font without serif). To my observation, this font is much more legible than Courier New especially when the characters are small in size. Sadly, the font doesn't support many Unicode letters especially Vietnamese and extended Latin. Looking around in Ubuntu's default font sets, I've found WenQuanYi Micro Hei Mono. This sans serif monospace font contains a broad range of Unicode letters including Vietnamese and other East Asian languages. This is exactly what I'm looking for in terms of readibility and Unicode support.

To my studies, WenQuanYi Micro Hei is an open source derivative of Droid Sans Fallback and is powered by many Linux distros. As you may guess, Droid Sans is the font for the hottie mobile platform - Android. Windows users can download WQY Micro Hei font here (The file format is a true type collection .ttc).

Here's the screenshot of Courier New (top) and WQY Micro Hei Mono (bottom) both in size 11pt, 100% zoom:

monospace_compare.jpg