Rotating sub-pixel text rendering

John Gruber of Daring Fireball (thanks for the link!) knows a lot about font-rendering, however in a recent post discussing screen-rotation and sub-pixel text rendering he let this slip:

“I tested it on my Cinema Display with the screen rotated 90°, and, to my eyes, sub-pixel anti-aliasing still looked good.”

That is just preposterous. Aside from his observation being completely wrong, he also revealed a bug in OS X: The current system doesn’t recognize rotated pixel orientations, sub-pixel rendering on rotated screens should probably be disabled automatically. (rdar://problem/5627732)

Here are two screenshots of my browser’s address bar as displayed on my Cinema Display, which clearly shows the difference. The top image is Leopard’s default sub-pixel rendering. The second image is the same bar photographed with my display rotated 90°, the photo was then rotated back in Photoshop for better comparison.

Comparison of rotated sub-pixel type

The text was apparently calculated against the presumed horizontal LCD primary orientation. But because the pixels were rotated, several of the letterform stems (verticals) are drawing as full-pixel-width colored lines. The first “h” is especially glaring, its stem and stroke are drawn as a pair of dark red and light blue lines.

Sub-pixel rendering takes advantage of a known horizontal alignment of the three color primaries that make up each physical pixel. The algorithm seems to render text at 3x the horizontal resolution, ignoring the color information and treating each third-pixel as a valid light source to use for drawing letterforms. That 3x width is then striped with red, green and blue to match screen’s component primary ordering. (That was an educated guess)

As Steve Weller stated in the post John linked, the human eye has “pathetic color-resolution”. This fact is exploited all over the place in video, with many formats sampling color only once for every four luminance pixels.

Several things are at play here:

  1. Human vision is the bifocal product of horizontally arranged eyes.
  2. Most written human language uses letterforms which are vertically oriented and horizontally distinguished. Especially Latin-derived languages.
  3. Most human languages read horizontally.
  4. Human vision tends to be less color sensitive for motion, or when scanning information (like reading)

It all just kind of worked out perfectly. Digital color reproduction combined our horizontal predisposition with our soft and slow perception of color, and then arranged color primaries horizontally. Text also reads horizontally, and since the viewer is rapidly moving their eyes, we perceive shape and contrast before color. Additionally, Latinate languages evolved letterforms which utilize horizontal variations against a largely regular vertical syncopation. Presto: sub-pixel rendering just seems fantastically obvious.

Regarding John’s closing supposition,

“I’m not sure the iPhones rotating display is reason enough to rule out sub-pixel rendering.”

Based on everything leading up to sub-pixel rendering in the first place, most of the benefits would be lost if the underlying pixel grid was vertically oriented. The sensitivity of computer text falls across the horizontal axis. Adding resolution to the vertical axis isn’t worth the effort.

Sub-pixel rendering is ultimately a transitional technology anyway, a half-step that improves the now while waiting for a better and inevitable future to arrive. Once we start seeing iPhone level pixel-densities all over the place, sub-pixel rendering will began its transition to technology footnote.

Digital displays will someday reach a point where every physical pixel is capable of producing every color of visible light. (And someone will doubtlessly push into near infrared and ultra-violet, claiming increased realism and fidelity). Future displays will also be operating at a density where anti-aliasing may not be necessary at all.

I still think Apple’s decision to use standard anti-aliasing for the Leopard menu bar was a mistake. Unless they’ve got some spiffy high-pixel-density cinema displays ready for MacWorld and enable system-wide resolution independence in 10.5.x, switching to standard anti-aliased text rendering in the menu bar was a change that should have been postponed. The necessary hardware pool just isn’t here yet and the result is an interface that looks markedly worse than it did under previous releases.

Original Star Wars and HiDef DVDs

John Gruber linked to the news that Lucas is giving in to demand (eg. money) and will finally release the Star Wars trilogy on DVD in their original, unaltered theatrical format. Han shoots first. John writes:

Bastards. I broke down and finally bought the current DVD trilogy collection just a few months ago now I’ve got to pay for it yet again just to get the versions of the films that I really want.

Hold your wallet. The release will be in SD, despite the news that HD DVDs will start appearing in stores this summer. Lucas, who is as brilliant a money-maker as he is a horrible dialog-writer, will rake in tons of money selling an obsolete DVD. All the Star Wars films will be available again in HiDef soon enough. And too many people will buy them all for the third, fourth or fifth time.

Lucas isn’t alone. All the studios are flooding the DVD market right now to sell as much as possible before the switch to Blu-Ray or HD-DVD.

Supposedly the porn industry likes likes Blu-Ray best, but you’d have to be delusional to think physical pornography sales are anywhere near as strong as they were before the Internet. Still, porn is generally credited with choosing VHS over BetaMax, at least this time they seem to be going with the better format.

Personally, I think HD-DVD may win this time. Not because it’s better, but because “Blu-Ray” is a dumb name. Ask any non-technical consumer what they want for their new HD TV, HD-DVDs or Blu-Ray disks. Sure a certain percentage of people will have Blu-Ray explained to them, “see, they’re both HD,” but how many will buy on name alone?

Never mind that the name itself looks (and sounds) like blurry. Not what you want to hear when dropping a lot of money to replace a bunch of movies you bought in SD a few years ago.

And so the studios might be slitting their own throats. Movie attendance is down over the past several years. Partly movies are kind of boring now, also suspense and action movies keep dancing around what’s really scary. But the studios now want consumers to re-buy movies they just bought. The great DVD migration wasn’t that long ago, most DVDs were probably purchased within the past 5 years. But now Hollywood wants everyone to buy those movies yet again, and they’re going to spend a fortune on conversion and manufacturing in a bet that consumers will buy the new disks. And if we don’t? Lots of bankruptcies.