g r o t t o 1 1

Peeve Farm
Breeding peeves for show, not just to keep as pets
  Blog \Blôg\, n. [Jrg, fr. Jrg. "Web-log".
     See {Blogger, BlogSpot, LiveJournal}.]
     A stream-of-consciousness Web journal, containing
     links, commentary, and pointless drivel.


On My Blog Menu:

InstaPundit
USS Clueless
James Lileks
Little Green Footballs
As the Apple Turns
Entropicana
Cold Fury
Capitalist Lion
Red Letter Day
Eric S. Raymond
Tal G in Jerusalem
Secular Islam
Aziz Poonawalla
Corsair the Rational Pirate
.clue

« ? Blogging Brians # »





Book Plug:

Buy it and I get
money. I think.
BSD Mall




 10/6/2003 -  10/8/2003
 9/29/2003 -  10/5/2003
 9/22/2003 -  9/28/2003
 9/15/2003 -  9/21/2003
  9/8/2003 -  9/14/2003
  9/1/2003 -   9/7/2003
 8/25/2003 -  8/31/2003
 8/18/2003 -  8/24/2003
 8/11/2003 -  8/17/2003
  8/4/2003 -  8/10/2003
 7/28/2003 -   8/3/2003
 7/21/2003 -  7/27/2003
 7/14/2003 -  7/20/2003
  7/7/2003 -  7/13/2003
 6/30/2003 -   7/6/2003
 6/23/2003 -  6/29/2003
 6/16/2003 -  6/22/2003
  6/9/2003 -  6/15/2003
  6/2/2003 -   6/8/2003
 5/26/2003 -   6/1/2003
 5/19/2003 -  5/25/2003
 5/12/2003 -  5/18/2003
  5/5/2003 -  5/11/2003
 4/28/2003 -   5/4/2003
 4/21/2003 -  4/27/2003
 4/14/2003 -  4/20/2003
  4/7/2003 -  4/13/2003
 3/31/2003 -   4/6/2003
 3/24/2003 -  3/30/2003
 3/17/2003 -  3/23/2003
 3/10/2003 -  3/16/2003
  3/3/2003 -   3/9/2003
 2/24/2003 -   3/2/2003
 2/17/2003 -  2/23/2003
 2/10/2003 -  2/16/2003
  2/3/2003 -   2/9/2003
 1/27/2003 -   2/2/2003
 1/20/2003 -  1/26/2003
 1/13/2003 -  1/19/2003
  1/6/2003 -  1/12/2003
12/30/2002 -   1/5/2003
12/23/2002 - 12/29/2002
12/16/2002 - 12/22/2002
 12/9/2002 - 12/15/2002
 12/2/2002 -  12/8/2002
11/25/2002 -  12/1/2002
11/18/2002 - 11/24/2002
11/11/2002 - 11/17/2002
 11/4/2002 - 11/10/2002
10/28/2002 -  11/3/2002
10/21/2002 - 10/27/2002
10/14/2002 - 10/20/2002
 10/7/2002 - 10/13/2002
 9/30/2002 -  10/6/2002
 9/23/2002 -  9/29/2002
 9/16/2002 -  9/22/2002
  9/9/2002 -  9/15/2002
  9/2/2002 -   9/8/2002
 8/26/2002 -   9/1/2002
 8/19/2002 -  8/25/2002
 8/12/2002 -  8/18/2002
  8/5/2002 -  8/11/2002
 7/29/2002 -   8/4/2002
 7/22/2002 -  7/28/2002
 7/15/2002 -  7/21/2002
  7/8/2002 -  7/14/2002
  7/1/2002 -   7/7/2002
 6/24/2002 -  6/30/2002
 6/17/2002 -  6/23/2002
 6/10/2002 -  6/16/2002
  6/3/2002 -   6/9/2002
 5/27/2002 -   6/2/2002
 5/20/2002 -  5/26/2002
 5/13/2002 -  5/19/2002
  5/6/2002 -  5/12/2002
 4/29/2002 -   5/5/2002
 4/22/2002 -  4/28/2002
 4/15/2002 -  4/21/2002
  4/8/2002 -  4/14/2002
  4/1/2002 -   4/7/2002
 3/25/2002 -  3/31/2002
 3/18/2002 -  3/24/2002
 3/11/2002 -  3/17/2002
  3/4/2002 -  3/10/2002
 2/25/2002 -   3/3/2002
 2/18/2002 -  2/24/2002
 2/11/2002 -  2/17/2002
  2/4/2002 -  2/10/2002
 1/28/2002 -   2/3/2002
 1/21/2002 -  1/27/2002
 1/14/2002 -  1/20/2002
  1/7/2002 -  1/13/2002
12/31/2001 -   1/6/2002
12/24/2001 - 12/30/2001
12/17/2001 - 12/23/2001
Monday, March 17, 2003
20:52 - No Anti-Aliasing For Oil
http://daringfireball.net/2003/03/antialiasing.html

(top) link
A few days back, John Gruber of Daring Fireball posted an article on one of Safari's quirks: it's too aggressive with Quartz anti-aliasing. Mac OS X's text smoothing is unparalleled, yes; but Safari ignores two aspects of the anti-aliasing model that the rest of the OS properly takes into account: 1) You're not supposed to anti-alias the very smallest fonts; and 2) You're not supposed to anti-alias monospaced fonts.

The thrust of the article is about those monospaced fonts, which Gruber rightly identifies as being useful in the modern world only for "displaying markup and programming language source code." Nothing else. Nobody wants to read text in Courier. Any plain-language text that's rendered in a monospaced font these days is done so only for satirical or legacy purposes, as to simulate a teletype or some such. It's a graphics-based world now, dagnabbit; and unless you're trying to write code or lay out tabular data for rudimentary layout/transport media such as e-mail, monospaced fonts are dumb.

But such uses do still exist; and when OS X apps like Safari try to anti-alias the monospaced fonts that I still use, it's sabotaging a paradigm that had been established way back in Mac history.

Gruber points out a particular example of why it was that the Mac has always been regarded as the prime platform for prepress and text layout. Apple has not just been the company that happened to put all its eggs in the GUI basket and shun the command-line and all its manifestations; it's also been the company that's knuckled down and set itself the task of defining how text and graphics and layout should be done on computers:

9-point Monaco is the last surviving masterpiece of the original Macintosh?s painstakingly hand-tuned set of pixel-perfect bitmap fonts, and deservedly so. Sure, it?s been tweaked in recent years (for example, to distinguish the lowercase L from the digit one, the zero from the capital O, and to enlarge certain punctuation characters, like the period, which originally was just a single pixel), but today?s Monaco 9 would look very familiar to a circa-1986 Mac programmer. Mac OS X introduced a newly refined 10-point counterpart, which feels much larger than the ostensible one-point difference from Monaco 9 would imply. Monaco 10 is also eminently readable, perhaps quite a bit more so than Monaco 9 on today?s high-resolution displays, and yet is very true to Monaco 9?s spirit.

He's got screenshots, too; he's not kidding. Monaco is a nice, nice font for monospaced applications. It's my default font for Terminal and for plain-text e-mail messages in Mail; though these are both Cocoa apps that take full advantage of Quartz rendering, they elect not to anti-alias Monaco and other monospaced fonts.

But just a few days ago, I found myself fiddling around with the prefs in Terminal; I was toggling the "anti-alias text" checkbox and watching the UNIX command-line text shift between smooth and unsmooth, between velvety OS X-y goodness and throwback, knife-edge legacy letting. And you know-- I left that little toggle switch off. The Terminal simply looks better without anti-aliasing on.

Part of it is because Monaco is so carefully tuned to look good without anti-aliasing. But I think it's just as much to do with Gruber's statement that "individual characters carry much more importance in source code than in prose. The ability to discern individual characters is more important than creating on-screen characters that more accurately reflect the style of high-resolution output." I think he's nailed it.

Safari has several kinks to work out; I'd thought that it would turn out to be the best browser at handling text since OmniWeb, since OW used the Quartz layer to its fullest potential and-- quite frankly-- rendered absolutely gorgeous text because of it. Chimera/Camino and IE, by contrast, seemed clumsy and uneven with their text handling; the kerning and leading never quite worked right. I always attributed that to the fact that IE and Camino were browsers that did their own text engines and eschewed the OS-level rendering that OmniWeb took advantage of, for whatever reason. I figured that since Safari was patently the most Cocoa browser to date, then surely it would follow the rules better than any of them. Right?

Well, not quite. How does one explain this?



Check out what happens to the leading on the lines that have italicized text in them. I've highlighted the text so you can see the excess spacing between lines; there should be no white visible. It should be an unbroken block of blue.

I've sent in this bug report already, but I'm starting to think that Safari's adherence to Cocoa standards in text handling is either inadequate, or massively overenthusiastic. I'm not at all sure which.


Incidentally-- and this is only tangentially related-- if anybody is wondering why Safari's performance in handling lots and lots and lots (e.g. hundreds) of form elements on a page is abysmal compared to other browsers such as Camino, it's evidently due to the fact that Safari's reliance on AppKit and Cocoa form widgets is biting it in the ass: AppKit and the Cocoa widgets are performance pigs. They're massively object-oriented, which we've known about forever; this is their blessing and their curse. Cocoa in its elegant architecture has enabled Apple and third-party companies to bring out more new software in less time, over the past two years, than I seem to be able to remember any other company doing in the past. Cocoa is revolutionizing the development process. But the price to be paid for that is the speed penalty that comes with OO design; OO is never as fast as highly tuned procedural code, sometimes very dramatically so. And the upshot is that Safari's performance in meter-pegging performance tests severely lags behind that of apps like Camino that sort of "cheat" and sidle around the OO structure, whether it means they lose the benefit of the OS-level rendering layers or not-- and whether that's a good thing or a bad thing.

I have an 800 MHz iMac here at work, and a 533 MHz PIII running Windows 2000. By any measure, megahertz-myth or no, the iMac should trounce the PC. But if I load a table-heavy page in Safari and IE on the two machines respectively, and start rapidly resizing the window, the Windows/IE contender beats the Mac flat. Why?

Two reasons: 1) IE on Windows is a kernel process; on the Mac it's squarely a userland function. Whether this is "cheating" or not is open to discussion; it certainly can't be denied that it helps boost a very complex set of functions to impossible levels of speed under Windows. But 2) OS X has the OO-ness of Cocoa to deal with, and that does cause a serious slowdown. It doesn't hurt the platform much in raw computational speed, such as in Photoshop filters or SETI@home; but when it comes to UI-intensive interactive work, Cocoa is a big drag.

Now, the good news is that the sunk cost of going to such an OO-intensive framework as Cocoa is just that-- sunk cost. It represents a fairly flat investment of CPU horsepower which will eventually be made irrelevant as the CPUs themselves improve. Just as the OS9 line was tuned to really come into its own with the G3 and especially the G4, OS X is really going to achieve UI "breakout" with the 970 and, in particular, the POWER5-based 9800 which will succeed it fairly quickly. OS X will run on G3s and G4s, but it really wants something with a bit more oomph, and machines with a bit more RAM (512MB is really a practical minimum, I've found) before the user will cease to feel trammeled by it.

What this amounts to is that yes, the Mac is slower than the PC, in many key areas; but that this is not attributable to any one factor, and each of those contributing factors is an investment made for a reason. The CPUs themselves sacrifice raw clock speed for vector processing, short pipelines, and low power. The OS sacrifices computational speed for OO-based developmental ease. The Cocoa widgets and style elements sacrifice feedback speed for looks and consistency. There's an argument to be made in favor of each of these factors; unfortunately, it's a different argument for each one, and the argument against each one has to do with-- yup-- speed.

So, once again, it's all down to "get those dang 970s here already".

And a 30-inch ACD while you're at it.

And bring me some sharks with laser beams on their heads!


Back to Top


© Brian Tiemann