July 4, 2009

A better font for programming in Flex Builder/Flash Builder

Filed under: Flexbuilder — Steve @ 9:06 pm

Whenever I use Flex Builder I don’t like the standard Courier or monospace font used in Windows or OSX. Instead I prefer to use the excellent Proggy Programming Fonts – they are excellent, concise fonts designed to be readable while remaining compact enough to allow me to see more code at the same time. Up until now though I’d only installed the fonts on my PC development setup, so today I thought I’d do the same on my iMac Flex Builder setup. For OSX, installing the font is as easy as downloading the font(s) you want, and dragging it to /Library/Fonts. To get it working in Flex Builder, go to Preferences > Appearance > Colors and Fonts > Text Font, and change the default font there to the one you want.

However on OSX I did this and hit a snag – the Proggy fonts are designed as pixel-fonts, that is they don’t look very nice when anti-aliased, so on OSX Flex Builder they look a bit rubbish at any size, even the 16pt they were designed for. One option is to turn off the global font-smoothing for 16pt and below in OSX’s System Preferences, but because that’s a global option it will affect the appearance of all fonts, and I didn’t want that. Fortunately I’m not the only one to have hit this problem, and I’m grateful to dispatchEvent() guys for their ingenious solution, involving resizing a whole set of Proggy font glyphs to something massive (you can download the fixed Proggy font from the post), which then allows you to set the actual size to 4pt in Flex Builder, thus bringing it under the default font-smoothing threshold in OSX. Works a treat! In their post on the subject some people also contribute some other solutions, including a command-line fix.

So now I have my favourite font working in OSX Flex Builder, I can get back to work…

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment