Xft Hack Improves Antialiased Font Rendering 360
Eugenia writes: "Font antialiasing first made its way to XFree through Qt/KDE only a year ago and GTK+/Gnome followed some time after. Even with the latest version of Freetype 2.08, which reportedly brings better quality, the result is still not up to par with the rendering quality found on some commercial OSes. David Chester has hacked through the Xft library and he achieved an incredibly good quality on antialias rendering under XFree86. With this hack, at last, XFree can deliver similar aesthetic results to Mac OS X's or Windows' rendering engines. Check the two brand-new screenshots ('before' and 'after') at his web page and notice the difference with your own eyes."
Re:good, but not quite excellent.. (Score:2, Insightful)
Changing two lines of code is "hacking through"? (Score:3, Insightful)
How does changing two lines of code merit a frontpage story on slashdot?
Re:Do I detect a hint of jealousy? (Score:2, Insightful)
Did YOU ever do anything so simple who's outcome was so useful? No, of course not. Otherwise you wouldn't be so damn pissed about it. Two lines of code it may be, but the results are what got people talking about it, and in the end that's all that matters. Except to people like you, of course.
Re:Steve Gibson debunks M$'s "innovation" (Score:3, Insightful)
Yeah, but Gibson is also an ass who doesn't seem to know the difference between scientific method and guesswork.
MS research [microsoft.com] has the fully detailed papers which indicate the fourier transforms, information theory and signal processing theory behind the technique. Which is a damn sight more thorough than Gibson's quackery.
"Oh yeah, apple did it all in the 70s". Bullshit. Back then, the Apple II didn't have the hardware or the CPU power to do the kind of calculation you need to do for Cleartype. Nor did it have the color resolution. All Apple's tech was was a way of hacking color out of a monochrome NTSC signal -- not getting better resolution out of a monochrome signal using color. Get the difference?
When are people around here going to do some thinking and some research instead of acting like idiots? I thought that people who flock to sites like this were supposed to be tech savvy? Maybe it's just me, but I thought that indicated at least a modicum of intelligence instead of blind sheepery.
Simon
erm... why is hinting enabled then? (Score:4, Insightful)
i'm not trying to insult the freetype guys, they've done great work to make X look nicer, but this hack would probably not exist if they would have disabled hinting by default.
the screenshots do look okay, but are still somewhat blurry. i actually prefer not using antialiasing below 10pt anyway, the fonts quickly become unreadable. but that IMHO of course.
Re:good, but not quite excellent.. (Score:2, Insightful)
My god, no wonder new exploits are constantly being found in Windows and IE.
Mike.
(-1, Offtopic)
Re:ClearType? (Score:1, Insightful)
AA text fuzzy? (Score:4, Insightful)
Re:Why is font rendering in X so bad? (Score:4, Insightful)
So how the OS is shipped determins how good the fonts look for most people. If you can make it look better, make that the default.
The goals of "making everybody see the light and switch to Linux, thus toppling micro$oft" and "forcing every Linux user to spend hundreds of hours learning about the system" are MUTUALLY EXCLUSIVE.
that's something completely different (Score:5, Insightful)
Anti-aliasing for computer displays is overrated anyway. Whether it helps or hurts readability depends on the font and font size, and on high resolution displays it is pointless. Printed matter isn't anti-aliased either, and printed matter is the gold standard for good looking text.
So, if you want text that looks nice, get yourself a 150dpi or higher monitor and don't bother with anti-aliasing. Anything else is a kludge.
Kinda sorta bloatware (Score:3, Insightful)
This seems to me to be a technology of limited use. Even at high screen resolutions almost all text is rendered at 12 pt, at which size anti-aliasing is more or less worthless.
It makes title bars look pretty. It makes big text on web pages look pretty. But for 99% of the text you see, it doesn't do much.
I don't want to discount the effort. I mean, if this program is as good as the screenshots suggest, then excellent job. (I haven't been able to test it out myself yet)
I guess I'm just not used to the modern computing era when it really is possible to throw in everything and the kitchen sink. I've gotta keep reminding myself that if something takes up an extra meg of Ram/swap and thirty megs of drivespace, that really doesn't matter. All of my instincts are still roughly in the 486 era, and I still think "why?" at every feature.
I just think at this point, the opensource community needs to give up its right to accuse others of bloatware. Bloatware is the modern standard, and if we don't embrace it, we look feature-poor. But Linux in the form that nearly everyone sees it and uses it today is bloatware. Well designed bloatware, for the most part, but bloatware nontheless.
Disabling hinting is NOT the way to go (Score:4, Insightful)
Without hinting, fonts will never look as good as they do on MS Windows or OS X.
Messing with the rendering resolution to make certain fonts look a little bit better seems to be the kind of hacking a chicken without a head could do.
This is not the ueberhack slashdot makes it out to be. This is not news.
regards,
Johan V.
Re:that's something completely different, -1 cluel (Score:2, Insightful)
Uh, actually virtually all CRTs are analog too. (Old CGA displays don't really matter much these days, though...) Or did you think the signal coming out of that 15-pin d-sub VGA connector was digital? Surprise, it isn't. Not to mention that some of the electrons meant to bombard phosphorescent element n tends to go astray a bit and bleed into adjascent phosphorescent elements. The results of this can be seen quite dramatically on low-quality CRTs at high resolutions.
In other words, paper is really no less digital than a CRT is. Just as a 640x480 image looks kinda blocky taking up your whole CRT, it looks just as blocky taking up a whole sheet of paper. It's paper's virtue of being able to handle insanely high resolutions that makes it suitable for "displaying" really clear graphics and text. I can't think of a single reason that a CRT oughtn't be able to do the same one day. Anti-aliasing is simply a stop-gap technology until that day arrives, IMHO.
Personally, if I had the option, I'd go for a 150 DPI (or better, actually 300 DPI would make me happy) display over something that only does, say, 1280x1024 with antialiasing. I'd much rather talk about picas and points than pixels. Pixels suck; they're the cause of too much geek envy. (Admit it! When you were still stuck with an 800x600 display you were drooling when your rich friend upgraded to a 20" display that could do a whopping 1600x1200.)
Re:that's something completely different, -1 cluel (Score:4, Insightful)
Well, maybe that's what they tell the arts majors. However, the term "aliasing" actually refers to what happens when you try to exceed the Nyquist limit: different frequencies are "aliased" together. Anti-aliasing removes that by band-limiting the signal in some way prior to sampling. When you print with toner on paper, there is nothing band-limited about the resulting image: the toner/paper transition has very high contrast edges at just about any resolution you care to look and those result in very high frequency components in the image.
the fact the the text doesn't look butt-ugly as usual.
You demonstrate a common occupational hazard for people working in graphics: you prefer style over function.
Think about anti-aliased text on a 150 dpi monitor.
For most monitors, you wouldn't even be able to tell the difference. And for a high-resolution monitor designed to display text, you make the display worse if you try to anti-alias.
Usually. What about when it isn't?
If you composite onto an image, the text needs to undergo the same filtering as the the image has undergone or it will look unnatural. In the case of compositing text into television images, there happens to be a single answer because, by convention, television cameras try to degrade the image in roughly the same traditional way. For digital images you find on computers, the filter could be anything.
Re:Every time i look at a Anti-aliased screenshot. (Score:3, Insightful)
The two are related, the text looks blurred because it is, that's what AA does - it smooths (or smears) the edge of the glyphs in order to make the "jaggies" less obvious. Until you get used to it your brain can interpret this as the characters being out of focus and sends all sorts of trial adjustments to the eye to try to bring it into focus, which it can never do as the characters really look like that. Eventually your eye becomes tired from all these micro adjustments.
If you fiddle with your XfConfig file you can tell X not to AA above or below certain sizes so you might be able to get a better effect that suits you. On the other hand, if your monitor is good enough and you only use fonts designed for screen useage just turn AA off!
TWW
Re:Font rendering in the X server (Score:5, Insightful)
What I'm talking about is fonts, and only fonts.
Antialiased text might be an interesting and cool use of the RENDER extension, but it's not a particularly good use, and here's why:
The end result that I see is that client side font rendering doesn't give you any real advantages over server side rendering, with the sole exception (that I can think of, at any rate) that the client will know that the font being displayed on the screen and the font being used for printing will have the same metrics and appearance. Other than that, you take a performance hit (client has to upload the font to the server every time it wants to use it, the same font will be uploaded multiple times by multiple clients or at least multiple toolkits, since it's possible for the toolkit to cache the font locally in shared memory or something. I'm making certain assumptions about the implementation here, though), you get inconsistent font handling and rendering (what says that toolkit A will use the same font set as toolkit B?), you'll probably use a lot more in the way of server resources if you're running clients on lots of different machines, and worst of all your desktop looks really inconsistent. The only time you don't really run into most of this is when the client and server are on the same machine. While I'll admit that this is most of the time, if you're going to give up some of the advantages of a networked display system why stop there?
It seems to me that this way of handling fonts does exactly the same thing for fonts that client-side GUI toolkits does for look and feel: causes a ton of confusion, makes it difficult to get a consistent look and feel on the desktop, and causes a lot of waste in the process.
So the bottom line is that, as far as I can see, what we really need is the RENDER extension and server-side antialiased font handling. (We also need server-side toolkits, but that's a discussion for another day).
This is often referred to as analysis (Score:2, Insightful)
Sometimes hours and hours of work can result in very few lines of code. It reminds me of the carpenter's rule: "think twice, saw once". Sometimes a great deal of analysis yields more results than many lines of code.
Gamma curves and antialiasing (Score:4, Insightful)
To be specific, imagine you're drawing an antialiased line, and you have come to a point where the line covers 50% of two adjacent pixels, so you decided to paint them both with 0x7f. The problem there is that a pixel that looks like 50% gray is actually emitting 18% as much light as a full-on pixel, so when you put the two 18% pixels together, they add up to 36% instead of 100%. The result is that a thin antialiased line will appear to get darker and lighter along its length. If you were to take this into account, it might improve antialiased text further.
The function to apply to all pixels is this, where x is a number from 0 to 255 representing the brightness you WANT to get, and y is what you have to plot:
y = (int)(255.0 * pow(x/255.0, 1/2.5) + 0.5)
The +0.5 rounding factor in there may not affect much.
I believe it was a Dr. Poynton who talked at length about this in the 1998 Siggraph.
Thanks.
blurry text (Score:3, Insightful)
Ah, so blurry text is an "aesthetic result"?
"Anti-aliasing" just means blurring [joelonsoftware.com], and is in general not a good thing. And this particular hack turns off hinting, to make it every blurrier.
Like headaches? Install this.
Re:Font antialiasing is a crutch (Score:1, Insightful)
The fact that so many people have gone so crazy over ClearType (a half-assed, ugly hack to squeeze in more pixels *only* in the horizontal direction) is a pretty good indication that people want more resolution in their displays.
Two things need to happen. One, more stuff needs to be resolution-independent. Right now, if you jack up the res on most Windows users' systems, they complain that things are "too small". Setting the size and the res on something should be different operations. Seriously.
Second, we need to get those high-res monitors out!
How much more would you pay for a monitor with 150 or 200 dpi?
Excelleny, hinting == misapplication of an idea. (Score:3, Insightful)
This work illustrates this perfectly. No need for debates, look at the images and learn. Well done and kudos for an awesome and simple piece of work.