Why does Consolas scale so well on Windows?

I was trying to make a font from scratch. I always admired Consolas and I wanted a clean style similar to it.

The problem is that my font doesn’t scale as well as Consolas. This is an example of my font on Programmer’s Notepad at a high scale. I only did the # glyph

enter image description here

the two characters are only scaled by 1pt in the application but they render completely different. As you can clearly see the upper horizontal line is shrinked when the size lowers while the bottom one is enlarged.

Consolas doesn’t have this problem, here it is Consolas at the same two sizes

enter image description here

Where am I getting wrong?

Answer

The difference is that Consolas has hinting and your font does not. Pure vector graphics do not scale all too well in small size brackets (sic). small lines may become smeared across two pixels for no good reasons. To combat this scaling problem fonts implement a technique called hinting

Essentially, if we simplify things a bit, hinting is a specially designed font variant for given size. Offcourse technically that is a bit more complicated than this.

Most font programs have decent autohinting tools that you can use as a basis for manual edits. Mainly auto hinting strive to keep horisontal and vertical lines suitably thick and uniform. This in most cases it usually sufficent.

Attribution
Source : Link , Question Author : Dean , Answer Author : joojaa

Leave a Comment