Friday, April 23, 2010

Snow Leopard, external displays, and fonts


UPDATE 05/03/2010: The correct answer seems to be this one: 10.6: Re-enable LCD font smoothing for some monitors. "The problem with the Automatic option is that OS X incorrectly detects many third party LCD monitors as CRTs, and consequently, disables LCD font smoothing."

A couple months ago I purchased a new 13" Macbook Pro. This was before the April updates, so it's the mid-2009 model. As an external display I'm still using the BenQ FP202W that I've had since 2006. The MBP connects to the BenQ with an official Apple-branded MiniDisplay-to-DVI adapter.

I've boiled the weirdness down to a reproducible case:

(1) Open XCode. The editor screen looks like this:


i.e. it looks normal. Legible.

(2) Connect the adapter to the BenQ monitor and connect the adapter to the MiniDisplay port on the laptop. My desktop appears on the BenQ and XCode still looks normal.

(3) Quit XCode and restart it. Now the editor looks like this:


It's the same font (Monaco Regular 12) but the rendering is somehow different. Weak and spidery. The difference is noticeable in the screengrabs, in person the difference is even more jarring.

TextMate does the same thing. I have TextMate also using Monaco Regular 12, so maybe it's related to the font? I have no idea what's causing this or how to fix it.

Saturday, April 17, 2010

Interactive Debugger for PHP


If you're looking for a free (zero-dollar) debugger for PHP, I've stumbled onto the combination of Xdebug installed onto the server and MacGDBp on my workstation. My favorite part is that I don't need to have a copy of the source tree on my workstation to do source-level debugging. It's transferred to me on demand by the magic of DBGP.

UPDATE: If you don't mind dropping a little money, I've been happy with the debugger in PHPStorm. You still need Xdebug installed on the PHP server for PHPStorm to interact with it.