Saturday, April 28, 2012

SQL Developer needs better font support

Warning: nerdom ahead...

SQL Developer is a pretty damn good tool for Oracle development. It has one problem that I find rather jarring, though: its text display in the editor is terrible. I've finally figured out what it is. Text isn't anti-aliased in the editor. That's a pretty significant oversight for any software written since, oh, Windows 95 or thereabouts.
Here's an example of what I mean:

That's the same two queries in SQL Developer and Notepad++ (great little text editor; if you're not using it, you should be). They look very different even though they're using the same font. Without antialiasing, SQLDev is displaying the "m" in the "from" in the second query as a freakin' square! And look at the difference in the asterisk. So moving from one program where text is nicely rendered to SQL Dev where it's, well, not, is jarring and annoying.
To be fair, I suspect this is not a limitation of SQL Developer itself, but of the Java component being used to render the text. But really, Oracle owns both. If they want SQL Dev to be the IDE for an enterprise-grade database, really, it shouldn't make my eyes hurt.
And a shout-out to @thatjeffsmith for his interesting talk on SQL Developer this week.
(In Windows XP or so, Microsoft introduced support for ClearType fonts, which is a really cool technology that provides sub-pixel antialiasing at the cost of some chromatic distortion. Since then, Consolas has been my go-to font for when I need a fixed-width font. I originally thought this was that SQL Dev didn't have support for ClearType fonts, but it's more basic than that, even.)

Kris Rice shows how to enable AA fonts. Awesome, thanks! (I didn't even realize there was a .conf file.)

1 comment:

Anonymous said...

The link you posted only enables anti-aliasing. Most modern operating systems do more than that when rendering fonts, namely they also perform subpixel smoothing to make fonts look better. Sadly, SQL Developer still doesn't support subpixel smoothing, so font rendering is still ugly compared to native applications, even with anti-aliasing enabled.