Archive for February 4, 2006

Saturday, February 4, 2006

Font Smoothing in Pages

Pierre Igot:

I am simply flabbergasted that Apple has not even fixed the font smoothing bug. After a whole year, they still haven’t read the bug reports and noticed that Pages fails to use the font smoothing style selected in “Appearance” in System Preferences? Unbelievable. The only rational explanation is that they somehow “forgot” to take the system’s font smoothing style into account when they first created the text rendering engine used in Pages, and now they would have to redo that text rendering engine itself in order to make it compatible, and they have just decided that it’s not worth the trouble. That doesn’t make it any less scandalous. First of all, how could they neglect to use the system’s font smoothing style in the first place? And now, how can they justify forcing users to cope with text in the wrong font smoothing style, especially given than most recent Macintosh computers use flat panel displays?

I’m not an expert on Quartz, but I don’t believe Pierre’s theory. As I learned several months ago, there are quite a few applications that don’t use the chosen font smoothing style. The pattern I see is that applications like Pages and OmniGraffle draw multiple layers with possibly overlapping elements. A logical way to implement this is to draw the elements separately into off-screen buffers and then composite them together. As far as I know, you can tell Quartz to use font smoothing or not to use it (CGContextSetShouldSmoothFonts), but you can’t tell it which style to use. Quartz automatically chooses the “right” font smoothing style, and the right style for anything but on-screen drawing is to use the CRT style.

Thus, unless your application draws directly into a view, it will sometimes use the “wrong” style. An interesting case is OmniGraffle, which normally uses the CRT style. However, while you’re editing text it uses the LCD style, presumably because the field editor is drawing directly into the view. (If you’ve written one of these drawing applications, please feel free to correct me.)

With the current Quartz API, it doesn’t look to me like this would be easy to fix. It’s not that the text rendering engine would have to change, but that the entire layout and compositing engine would. My guess is that this would reduce performance and needlessly complicate lots of code that’s unrelated to text rendering. It would seem that the best fix would be for Apple to allow the application to choose the font smoothing style, though perhaps it had good reasons for not allowing this in the first place.

Subversion Compilation Benchmarks

Luis de la Rosa has compiled a list of how long it takes to compile Subversion on various Macs. My iMac Core Duo (2 GHz, 2 GB) took 1:57. My dual-progressor G5 (2 GHz, 2.5 GB) took 4:31 with no applications running, after it had been on for a day. When I restarted and timed it again it was, as expected, much faster: 2:46.