It has nothing to do with hinting, I always have full hinting + RGB-subpixel-hinting enabled on all my boxes, as well as dpi on system default.
The dpi setting only influences the size of fonts, not their shape or rendering. I just checked with xdpyinfo, Lenny@17" runs at 95x96 dpi, #!@24" at 94x94 dpi, which is what the xserver determines from the monitor's DDC info, and both screens are showing correct sizes.
Fonts on my #! setup are not too bad, at least not like on Debian Lenny without the cleartype patches, but I can see a considerable difference, for example if I look at the letter "w".
Strangely the effect is not consistent. If I type "www" in the address-bar or search-engine field of firefox, it looks worse, than a "w" showing up in the forum text in the firefox browser window, or if I type "www" in gedit. But independently of the app I type a "w" in, it just does not look the same as on my Debian Lenny box with the cleartype patches, where all font-rendering looks just awesome, whereas on my #! setup I'd describe it as a little crappy.
I know, that most people do not really recognize that effect, especially if you are not used to anything else, and if you do not have two screens side by side to compare, but I do, and I have to say, there really is a huge difference. The font-rendering on my Debian Lenny setup is so much more pleasing to the eye, I really don't want to miss that.
So if it's not a font thing, and has nothing to do with hinting, I guess libcairo + libfreetype + libxft on Ubuntu do not have the full cleartype patchset applied (which may be a license issue?). That way it comes down to the following order:
(1) libcairo + libfreetype + libxft patched with the cleartype patchset
(2) stock Ubuntu (definitely has patched font-rendering, but obviously not the full cleartype patchset)
(3) stock libcairo + libfreetype + libxft without patches (as supplied by the Debian repos)
So either I have to start fiddling around with patching the Ubuntu sources of libcairo + libfreetype + libxft myself, or I try to get to a #! setup on Debian Lenny (which most likely would be a better idea anyway, because I just feel more comfortable with Debian Lenny, than with Ubuntu).