Using alpha blending for underlines

I love alpha blending. I use it all over the place, in part because I'm still just trying stuff at random to see if it's useful. I don't think alpha has been mainstream for long enough that we've really explored it properly. My editor makes effective use of alpha in highlighters, for example, and in the best Unix terminal emulator, I came up with a new use for it. (Note that if you follow the link, the screenshots are too old to show this.)

A problem we had was that the underlining was too heavy, and it kept colliding with the monospaced fonts' descenders. What I really wanted was a way to stop the underline just short of any descenders, but I couldn't think of a cheap way to do it. (We might not have performance as good as rxvt, but we were competitive with konsole and gnome-terminal last time we checked.)

The solution I came up with was simple and surprisingly effective: use an alpha color. Rather than insist on a separate compositing step, as Apple's Objective-C API seems to, Java lets you have colors with alpha, and any drawing using a Graphics that's using such a Color will be alpha-blended. The effect is almost the opposite of the problem we're trying to solve: instead of disappearing, the descenders stand out more, because there the underline is combined with the text.

Download it, and have a go.