Sublime Forum

Two questions about fonts

#1

Recently I purchased a font with excellent unicode coverage and looking almost as good as Consolas.
However, its not quite usable in Sublime:

  1. antialiasing does not work. I uploaded an image for comparison, left is Sublime rendering, right is how the font looks in MS Expression Blend (and all .net/WPF apps). Is it possible to force antialiasing in Sublime?

  2. line spacing is too high. This is true for some other fonts as well, and they also contain asian chars. Is there a setting to control line spacing?


0 Likes

#2

Sublime Text uses the system wide antialiasing settings, so the first option is to globally enable cleartype in the control panel (WPF is well known for ignoring the system font settings).

You can force Sublime Text to use subpixel or greyscale antialiasing by appending " :cleartypeantialias" or " :standardantialias" to the end of the font setting. Line spacing can be increased in Sublime Text (“linePaddingTop” and “linePaddingButtom”), but not decreased.

In general, any differences in font rendering should be coming from Sublime Text using GDI to do its font rendering (like 99% of all other Windows apps), and WPF using its own font engine that renders differently.

I’ll happily look into fixing any rendering differences between Sublime Text and other GDI based apps, but in general, for any font rendering discrepancies it’s WPF that’s in the wrong (e.g., google for “WPF blurry font rendering”).

0 Likes

#3

Thanks for the answer, Jon,

there is no difference between Sublime Text and other GDI apps, I just thought there is a way to somehow disable windows hinting/force cleartype at all font sizes. This font becomes antialiased only from size 18 and above, even with :cleartypeantialias option.

0 Likes

#4

There’s nothing that can be done at the GDI API level (i.e., LOGFONT and friends), but perhaps it’s possible via the Cleartype Tuner.

0 Likes