Home Download Buy Blog Forum Support

Two questions about fonts

Two questions about fonts

Postby lashtal on Sun Jan 16, 2011 1:21 pm

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?
Untitled-1.png
Untitled-1.png (1.48 KiB) Viewed 2900 times
lashtal
 
Posts: 19
Joined: Tue Oct 12, 2010 5:06 am

Re: Two questions about fonts

Postby jps on Sun Jan 16, 2011 9:19 pm

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").
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Two questions about fonts

Postby lashtal on Sun Jan 16, 2011 11:14 pm

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.
lashtal
 
Posts: 19
Joined: Tue Oct 12, 2010 5:06 am

Re: Two questions about fonts

Postby jps on Mon Jan 17, 2011 1:04 am

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.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 45 guests