4 Sep 2001 raph   » (Master)

Is it time for some rocket science?

I've been playing around a bit with antialiased x-terms using the X render extension, with a particular eye toward font quality. It's not as good as it should be. Meanwhile, proprietary platforms such as the Macintosh have truly excellent font rendering. Check out this OmniWeb screen shot, for example.

Extremely high quality antialiased font rendering is a hard problem. It's also one with a somewhat limited span of interest - as soon as 200 dpi displays become ubiquitous, non-hinted aa will become the ideal solution. The big problem with non-hinted aa at lower resolutions is loss of contrast.

A long, long time ago, a group of rocket scientists did some serious rocket science, resulting in a very impressive font rendering system for hinted, non-aa fonts. However, as it was too difficult to use, very few fonts were made in this system, and the fonts that were made did not excite graphic designers. The proprietary world later adapted bits of this technology in stripped-down, but far more usable, form. TrueType carries forward the concept of using a programming language to compute the hinting, while Adobe Multiple Master fonts carry forward the concept of adjustable font-wide parameters. No current proprietary system implements all of the original rocket science vision.

At the time these rocket scientists did their work, nobody was really thinking about antialiased font rendering. The displays just didn't exist at the time. Heck, even mono-bit displays of sufficient resolution where you'd want to use proportionally spaced fonts were still a bit on the cutting edge. Thus, the original rocket science, while an impressive bit of technology, is not particularly suitable for today's needs.

Meanwhile, free software hasn't been standing still. FreeType is an impressive renderer for the proprietary font standards. However, Type 1 isn't particularly well suited for screen resolution fonts, and while TrueType is, it's saddled with a particularly nasty patent situation. Thus, US users can't legally use a free desktop with good quality fonts.

There is a solution: do some more rocket science. I recently dusted off an old prototype of mine, code-named "procedural screen fonts". It shares from the original rocket science the concept of using programs to determine the geometry of the glyph. I hacked up an interesting antialiased stroke renderer that can handle the (primitive) PSF stroke geometry, which is lines and 90 degree sections of elliptical arcs. The results, as a proof of concept, are encouraging. In particular, stroke contrast is quite near the non-aa case. These fonts don't look much like the "real" fonts they're supposed to represent, but that can be fixed.

Like all rocket science, there's quite a bit of work to be done to make it real, no matter how encouraging the proof of concept. I have a fairly clear vision of what needs to be done: generalizing and tuning the stroke renderer to handle arbitrary cubic splines and varying stroke weights, adapting the Hobby's global curvature optimizer so font designers don't have to fiddle with Bezier control points, actually drawing enough glyphs to be usable, and of course integrating with other applications out there.

Should I spend serious time on this? There are a lot of other things competing for my attention. Would I get significant help from the rest of the free software community? Past experiences have been mixed. To a large extent, I just don't know how important this work is. Perhaps everybody is happy with the status quo, happily ignoring the TrueType patents. If so, I should be spending my time on something else. And, as I mentioned before, as soon as 200 dpi displays come along, the work becomes a bit moot. I can buy an IBM T220 for far less than it would cost me in time to push this project forward. So I get a fabulous aa display soon no matter what. This affects the users, the poor huddled masses who can't afford 200 dpi displays. You can tell me how useful this work would be, but talk is cheap. Can you back it up with action?

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!