Xft Hack Improves Antialiased Font Rendering
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."
I can see clearly now the fonts are antialiased...
I can see all webpages, in my way...
---- The geek shall inherit the Earth.
I get the feeling that there is still work to be done, though. If you have windows xp, it's worth turning on the ClearType setting in Display -> Appearance -> Effects. XP starts as anti-aliased, but ClearType brings an even greater level. Of course, if you haven't seen ClearType in action, it's hard to expect improvement from plain old win2k. But the font improvements shown above in XFree are amazing, like night and day, no more blocky p's and q's at the wrong font size, which will make a lot of happy people at non MSFT boxes. =)
Having worked with GOOD font rendering software (mainly for broadcast television) I can say that most gui renderers do a pretty horrible job.
It's not that they get the font shape wrong, or don't antialias correctly, it's that they don't allow for how people see things, and just antialias 'mathmatically correct'.
With the fonts we use for television character generaters, several seperate rendering passes are used to give:
1 - a solid and anti-aliased 'interior' to the font (this is 'normal' antialiasing)
2 - a perimeter or border to the font, in a slightly different colour/darkless level, to make the edge stand out
3 - a seperate rednering to the alpha channel to stop the font from 'blending' excessivly at the edges with the background (ie: a buffer zone).
This makes a MASSIVE difference to the quality of the fonts, especially on anything other than a solid colour background.
unfortunately, no OS as yet does this for it's screen display fonts, which is a pity, as it makes a BIG difference.
Having said that, I'm VERY happy that improvements are happening, as good font rendering makes a hugh difference to the effort required to read text.
Comment removed based on user account deletion
Comment removed based on user account deletion
How does changing two lines of code merit a frontpage story on slashdot?
All i can say is that my fonts look better than those screenshots. But its probably because of the sub pixel rendering on my lcd screen.
all you have to do is add one line to your XftConfig
here is a howto:
http://jmason.org/howto/subpixel.html
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.
What you are looking for is called Enlightenment :)
It's basically the only window manager I've seen that does fine-grained window memory right.
(half off-topic, I know).
It's like the text is always too small, too large, or not the one the developer intended.
Not to troll, but this is exactly the kind of thing that has much more effect than technical people believe.
Is it something in the design? The freely available fonts?
Here's another mirror. Sorry about those stupid ads.
I also want emphasize one thing that I say on the website. I can't take a whole lot of credit for the improvement. For sure, the freetype project and Keith Packard, author of XRender and Xft did all of the hard work. I just tweaked a few settings (adjusted glyph proportions and turned off hinting).
David Chester
Check out this article [grc.com]. ClearType is just Microsoft's name for sub-pixel rendering, and it's been around for decades now.
Yeah, but Gibson is also an ass who doesn't seem to know the difference between scientific method and guesswork.
MS research 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
Coming soon - pyrogyra
it might just be a typical "ignorance is bliss" situation on my side, but if this effect was largely achieved by disabling the (apparently buggy) hinting support in freetype, why did they enable it in the first place?
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.
I'm really not trying to troll here but anti-aliased text has always looked fuzzy to me. In the screen shots, for example, the spacing and sizing of the AA text is certainly nicer but the default text seems shaper and crisper. Am I wrong here? Joel Spolsky agrees with me but everyone else seems so excited about AA text that I have to wonder if I'm missing something.
http://grcsucks.com/
Why can't people see the real answer is just to develop ultra high resolution displays finer than the resolution of the human eye, then we can just make razor sharp fonts like a high quality laser printer. :) Okay, so we'd need a 4gig GeForce20 Ultra, but it would look 3R33T.
I'm Rick James with mod points biatch!
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.
XFree86 4 supports sub-pixel anti-aliasing (aka ClearType). You just need to put match edit rgba=rgb; in XftConfig.
Be patient. Keith Packard is pretty well done with his design and implementation of a new font selection configuration mechanism currently known as "fontconfig". Fontconfig separates the font selection from the rest of Xft, allowing other applications such as printer drivers to select fonts using the same mechanism and policy as X applications.
In the process, fontconfig replaces the arcane Xft configuration language with an XML DTD. This should allow easier hand-editing of this configuration. More importantly, it should allow GUI toolkits such as KDE and Gnome to easily put a GUI interface on font selection configuration. Hopefully, in a few months you'll be able to just click a button to get sub-pixel font rendering with Xft.
This really isn't meant to be a flame.
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.
In Capitalist America, bank robs you!
Actually, I had the same problem.. very few fonts that would do AA, and even then, the Konsole text would come out very garbled...
/etc/X11/XftConfig. Just a suggestion, seems likely that it's your problem too.
It turned out that I had just never edited my
XML is like violence. If it doesn't solve the problem, use more.
Do you think he got inspired by god and changed those two lines. There must be background work where he did all the tests and research about this.
An analogy from mathematics is about how mathematicians come up with proofs to theorems. They first come up with a theorem which is a solution to a problem hoping their guess (or guesses) are correct. Then starting with the solution, step by step try to prove back to the original problem. Once they come up with a solution, it is probably 10 pages long and pretty ugly. Then they start refining the proof. At the end you have 3 lines of proof, which makes you think "How did this guy come up with this cute proof?".
Why isn't font rendering done properly in the X server itself, where font rendering originally was done? Why must it be done client side?
I mean, the X server already knows what kind of visual you're trying to render to, so it's really just a question of getting the X server to pick up the necessary font information (transparency information at the edges of the letters if you insist on the X server itself not understanding how to render fonts). And the types used for the font rendering calls are all opaque anyway, so it shouldn't matter whether or not the font structure in the GC (on the server) stores additional information about the font being rendered, right?
All it would take in addition to the improved font rendering code in the X server is the definition of a new font server protocol that allows the transmission of more than just bitmap information to the X server from the font server and you'd be done, right?
So why isn't this being done instead of these client-side hacks that require magic rendering extensions (which are quite cool in and of themselves, but why should the client have to have a full set of fonts stored locally in order to do antialiased text?) ? The biggest advantage of this scheme by far is that you don't have to have any magic support for antialiased fonts in your toolkits: you get antialiased fonts for everything no matter what toolkit it's using (even Athena widgets would have antialiased text if the antialiased font rendering were done entirely server-side).
Or is this already what's being done, but I somehow missed it?
Use 'slashdot stuff' in the subject line in any email you send me if you want to get past the spam filter.
This is not only a problem with Netscape. The HTML code of the page is broken: there is a <table> tag at the beginning of the page and it is never closed. The table structure is incorrect anyway, because the <table> tag is immediately followed by <td> without a <tr>. The same problem occurs for a <center> tag and a <font> tag that are never closed (besides, the <font> tag occurs just before a block-level <h2> tag, so it should have no effect). Also, all color specifications are incorrect: missing quotes, missing "#" sign before the hex values.
MrP-, if you are mirroring this slashdotted page, it would be a public service to fix the most obvious errors so that the mirrored page can be viewed by most browsers and passes at least some minimal HTML validation tests. The easiest way to fix the problem would be to remove the offending tags (2nd, 3rd and 4th line in the original page).
I highly recommend checking the page with HTML Tidy or with the W3C validator.
-Raphaël
I'm not entirely sure what to think if the "aesthetics" of say ClearType (or whatever it's called) in Windows. I just turned it on a few minutes ago, and my initial reaction was: ... it looks like they just made the text broader*, as if they've made something like tripple vertical AA**"
:-)
"Hmm
It doesn't hurt my eyes, and text generaly looks more "roundish"*** which is nice - I think. Maybe it isn't, not quite sure yet. Now, this text (the text I'm typing right now) looks "skinny"* compared to the other text, as if it's only getting a double vertical AA** treatment.
Antialiased text (and other things) in theory is nice, because it's more "true to nature" (if there is such a thing in computing) - when was the last time you looked at bubble and thought "nah, those edges are jagged"? I thought so. On the other hand, I have from time to time caught myself looking out the window on say a sunrise and thinking "damn. They sure are using some cool effects."
I think another poster hit the nail. In essence he's saying that the people who make the AA algorithms are aparently more interested in making them "mathematically correct" than visually pleasing. Having stared at Microsofts ClearType for almost 15 minutes now, I tend to agree with both CmdrTaco and the aforementioned poster - somethings rotten in the state of text-AA.
*I'm Danish - can't quite think of a better word in English.
**I have no idea if that even makes sence outside of my own head
***Nope, can't even think of a better word in Danish.
We do not live in the 21st century. We live in the 20 second century.
Ah, but you see... I _don't_ use Linux. I use FreeBSD, and that trick is marked _quite_ clearly in the FreeBSD handbook in the fonts subsection of the X section.
<evangelism>
I haven't had any problems with finding FreeBSD documentation, actually. Practically everything is on the FreeBSD website or one of its mailing lists, so I don't experience problems here.
On the other hand, I get to build everything from source, so I need to do everything for hours upon hours anyway! (:
</evangelism>
----------
Floccinaucinihilipilification - the action or habit of judging something to be worthless
Down at the bottom of the page, he shows his older method which was individually optomized for a particular font (he chose Times New Roman), and which he later abandoned. So yes, he explored at least one entire line of thought before abandoning it and apply what he had learned from that.
--
Evan
"$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
Ah, how intuitive... how many hours of reading manpages, HOWTOs and FAQs did it take to figure that one out?
It could have taken you one Google search for "xfree86 subpixel rendering" to find this link!
-adnans
"In short: just say NO TO DRUGS, and maybe you won't end up like the Hurd people." --Linus Torvalds
libgdkxft, which does subpixel antialiasing, is apt-gettable in debian woody.
All you need to do after apt-getting the packages is install a bunch of truetype fonts, then add the line 'export LD_PRELOAD=/usr/lib/libgdkxft.so' to your ~/.xession or some other appropriate location:
I had some issues getting it all working, but that was mostly user error. (I'd been playing with xfstt shortly before trying gdkxft and they seemed to interfere with each other)
A good howto on setting it up is here
It makes mozilla look really pretty =)
On the contrary...
If there is a browser that you got a chance to see an IE only web site is Konqueror on KDE 3.0 - it got the most compatible with MSIE javascript and rendering techniques...
Hetz (Heunique)
This guy just disabled hinting and adjusted the rendering resolution to his liking.
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.
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.)
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.
Ikons will be in 3.0. Crystal-icons will be in 3.1. Check out the screenshot from lates KDE Kernel Cousin: http://kt.zork.net/kde/kde20020301_34.html )
Lesbian Nazi Hookers Abducted by UFOs and Forced Into Weight Loss Programs - -all next week on Town Talk.
JavaScript Instructions to get rid of Ads.
- Kaos games and encryption systems developer
That's because selecting it from a drop-down-menu is comparatively intuitive, all other restrictions of Windows notwithstanding. :)
:-)
You know, I think I could enable subpixel rendering *faster* on Linux. On Windows, I would need to *find* the menu where windows hides this option. If you've experienced XP you'll know that this might not be as easy as it sounds. I'm sure I'll be pestered along the way by so called warnings about "damage" to my computer if I enter such and such a directory
And once the XftConfig langugage is replaced by a more structured XML DTD (soon) it will be much easier to concoct a GUI which would supposedly make activating/deactiving these features easier.
-adnans
"In short: just say NO TO DRUGS, and maybe you won't end up like the Hurd people." --Linus Torvalds
Now color me crazy, but since when has attaining similar aesthetic content to Windows been considered a good thing? It hurts my eyes just to look at it. I long for the good old days without those fancy anti-aliased fonts, although Mac OS X is quite pleasurable to use.
I didn't like the anti aliasing ("smooth edges of screen fonts") in Windows 2000 and didn't use it for a long time. Then it somehow got turned on, and when I noticed I decided to give it a chance. After a few days, I got used to it, and everything really does look better now. I stopped using Linux as a desktop, fonts being a big reason, so I don't know how well X does fonts with this (imho the screenshots are horrible on the eyes), but I suggest giving it a try for a few days and see if you end up liking it better.Regardless, it works.
The incredible quantity of design that went into X still produces an end result which causes the uninitiated to say "it's way too complex, and it just plain sucks."
Of course, then we explain that it doesn't suck, and that it's based on a perfectly sound architecture, and that it's really a work of beauty.
None of that changes the fact that it sucks.
The fonts look better with this (ugly) hack. Much, much better. This is the Sistine Chapel of two-line hacks.
--grendel drago
Laws do not persuade just because they threaten. --Seneca
Maybe it's because I'm using subpixel rendering
on my LCD screen right now, but the 'after' images
look much worse than the regular XFT rendering to
me.
The scalloped tatters of the King in Yellow must cover
Yhtill forever. (R. W. Chambers, the King in Yellow
So in place of using configuration files that I can analyze, modify and distribute in an automatic fashion you suggest that it is better to find out a little checkbox somehwere in the middle of who knows how many tabs, sub-menus and other check-boxes, all this sometimes hidden behind one or two buttons and that make the change undistributable (unless you understand the registry, and sometimes not even then).
Yeah, GUIs are very intuitive and easy to use.
IANAL but write like a drunk one.
Fact 1: Hinting improves font legibility at smaller sizes.
Fact 2: Freetype doesn't interpret the bytecodes in the fonts that are needed for proper hinting because of patents detained by Apple.
Fact 3: It uses an alternative bytecode "guesser". People may or may not like it, even though it usually improves legibility. This Canadian dude (I have the right to use this term because I am myself a Canadian dude ;)) only disabled the bytecode "guesser" because he didn't like it. Fine.
Fact 4: Rather than disabling the bytecode "guesser", enable the patented bytecode interpreter. Remember, this is illegal if you live in the U.S. and haven't licenced the patents from Apple.
For your enjoyment, I've made RPMs for Mandrake 8.1 and Redhat 7.2 of the Freetype library with the patented bytecode interpreter enabled.
$10,000
Breakdown:
Changing 2 lines of code = $1
Knowing which 2 lines =$9,999
Anyone who has maintained a large codebase, or has made mods to someone else's code, knows this:
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.
Read my sig if you like, but I'll never see yours, thanks to Discussions, Viewing, Disable sigs...
I actually found this informative, and not at all trollish. Someone mod it up....Oh, I forgot, it mentioned an OS other than Linux in a good light. Well, then, never mind.
Damnit, Jim, I'm an anarchist, not a F@#$!^& doctor!
Check out this page which I just threw up. It shows the difference at the pixel level between ClearType and this guys hack.
You can see that ClearType isn't just using grays, it's using other colors... presumably that will only make a difference on LCDs. But you can see quite clearly that ClearType is trying to get full pixels whenever it can. Look at the second leg of the 'n'... it's a gray blob with the XFree hack, but Cleartype has a solid black line.
-Erik
Sometimes I wish instead of cleartype that Microsoft advertized 3 years ago it was 3D graphics or something because even though there seems to be more to life than font rendering, most people don't know what's important without Microsoft to lead the way. Now that we have to spend our existances getting the absolute best approximation to cleartype it's like Microsoft advertizes exactly what doesn't matter so their competition doesn't beat them at what does matter.
Well, I must say that at larger sizes, I much prefer the original `hinted' text, since it shows up much darker on my display. However, the non-hinted text seems to be much more legible at smaller sizes, and it definitely scales much more cleanly (no jumping from everything being ~1 pixel wide to everything being ~2 pixels).
If the non-hinted text could be made darker, that would be great! Of course, I hear that the hinting engine is getting better and better, so who knows what will be the best a year from now..
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
You're obviously not in my first-year CS courses. Maybe its because I'm coming back to school several years older than my classmates, but christ, they're pretty clueless about technology.
If one more of them says he's in CS because programming pays well, I'm going postal.
--saint
If you want to accomplish something similar, before compiling freetye, look at line 435 of include/freetype/config/ftoption.h in the source distribution before compiling. That disables the hinter. I'm not if this is as effective as what the guy did to the Xft library. I don't have the orginal source files at the moment, so I can't tell exactly what he changed. I also can use his libXft.
Another option is to realize that the hint guessing that freetype does to avoid patent infringement problems by default can be changed to use a bytecode interpreter that does proper hinting of TrueType fonts, Change line 378 of the above mentioned file for this to occur. I still don't understand how making the code "optional" makes it any less patent infringing..
Of course, no matter how you configure freetype, it will still look like crap without good fonts.
http://www.linuxquebec.com/~nomis80/ has a script to automate installation of Microsoft true type fonts.
Of course by enabling the bytecode interpreter and *possibly* by getting MS fonts without a MS OS, you may be doing illegal stuff, but if pretty fonts under X is outlawed, then only outlaws will have pretty fonts under X, or something like that....
Disabling hinting with the default fonts is probably the most legal way to go, but what is the fun in that?
XML is like violence. If it doesn't solve the problem, use more.
"XFree86 4 supports sub-pixel anti-aliasing (aka ClearType). You just need to put match edit rgba=rgb; in XftConfig."
Ah, how intuitive... how many hours of reading manpages, HOWTOs and FAQs did it take to figure that one out?
Goddammit. This is what I really hate in Linux. You have to read tons of obsolete and badly written documentation until you can turn on something as trivial as sub-pixel rendering.
Actually, whenever I want to find out about something, I usually hit the newsgroups to do a search. Usually I find what I need in about fifteen minutes or so. That's what I love about Linux: the community is always eager to help each other out by writing about their experiences. You don't find the same spirit of community in Windows...
Unless you enjoy tweaking your computer for hours and hours instead of getting something productive done at work, the current state of affairs is just unacceptable.
You said it, not me: if you enjoy tweaking your machine, you can do it for hours - but you don't have to. If you just want to do productive work, go ahead! In most modern distros (Mandrake in particular) the hardware detect and system setup is automatic...I don't know about sub-pixel AA for laptops, though...it might be good if someone actually made a distro just for laptops, as these usually seem more temperamental than desktops (and not only with Linux: installing Windows on some laptops can be quite complicated...)
Reminder: find a new sig
that you take your glasses *off* to anti-alias fonts? :)
XML is like violence. If it doesn't solve the problem, use more.
Those high-res printers you speak of, still use anti-aliasing.......
...
No, they don't. A dot on paper is either there, or it isn't. You don't print with multiple shades of grey and black ink to give the illusion of higher resolution. Around the 200 DPI mark, printed text takes on the appearance of smooth letterforms, not patterns of dots. Of course, you can tell the difference between 200 and 2400 DPI easily, but the point is that 200 DPI is where you stop seeing the pixels before you see the letters.
You may be thinking of halftones, which are patterns of dots of various sizes that can achieve the illusion of tone when viewed from a reasonable distance. This isn't anti-aliasing at all.
And by the way, an ellipsis has three dots, like this:
The only AA font system I have ever liked, is the old RiscOS AA. It rendered the font very well. They where clear, (MS AA is worse), precise, (RiscOS used 'sub-pixel AA, which made different looking characters pixel-wise, but looked the same on screen. Just type 'iiiiiiiiiiiiii' in the Times font into Word/Mozilla) and it was very configurable; Anti-alising, hinting etc. could all be set by the user. The MacOS X fonts look similar, but I still have to see them in action.
> wow. not only is it buried in some friggin configuration file (how many does X have?
Likely no more friggin configuration files than Windows has friggin hives and friggin entries in it's friggin registry.
Bleah.
Codifex Maximus ~ In search of... a shorter sig.
Those patents are kinda hard to read. Maybe them should have used the hinting technology to print it ;-)
People in the XFree project may already be considering this, but antialiased objects look much better when you take into consideration that a gray ramp that is perceptually linear is not optically (luminously?) linear.
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.
I don't think any of this has to do with ClearType really. I think people are motivated by seeing how nice fonts look on other systems (including ClearType, but also Mac, and what Be had, etc...)
The bits that make ClearType above and beyond typical anti-aliasing are actually in the Xrender extension used by the AA font system, and that is subpixel operations (i.e. taking advantage of order of red, green, and blue elements in an LCD screen to effectivvely triple horizontal resolution). The key things needed are a) well-hinted fonts and b) good strategy for understanding and following those hints. a is easy to solve by downloading, say, MSs fontset. A more proper solution will eventually happen, but for now it works. b has caused some problems, as this little thing shows. The "auto-hinting" functionality where FreeType tries to guess the hints without actually interpreting them causes fonts to look worse than better, and in the end we are better off with no hinting than auto-hinting. The "proper" solution to hinting is in FreeType, a bytecode interpreter for the hints. The problem here is it is not a default because doing so would make Apple (who has a patent on reading and using those hints) angry. I posted already in this forum the "right" way of disabling hinting in freetype or enabling the better, but illegal bytecode interpreter....
A lot of the growing pains has more to do with Apple than it does with MS.... AA fonts look nice, even if they bring next to nothing to the table in terms of utility and usability, and I don't think the development needs the prodding of MS to seek out better eye-candy. If anything, MS is pushing more eye-candy (XP) because of prodding from Apple and X based eye-candy...
XML is like violence. If it doesn't solve the problem, use more.
Well, duh. Yes, I know all about Google and Google groups. That's how I get all my Linux setups working eventually. The point is (besides the issue of how I was supposed to search for an option I didn't know exists -- why would I search for "subixel rendering"?) that this is something that should be solved by the installer, not by Google searches by the user.
And work is apparently underway to do that.
What I'm listening to now on Pandora...
Well, you are very confused. Laser printers do use pixels. While the individual characters (if you're using PostScript fonts) are defined by vectors, they are rendered by the PS RIP as just lots of little dots at whatever resolution the printer is. The same thing is happening on your screen (if you're using non-antialiased font rendering), just at much lower resolution.
-- It only takes 20 minutes for a liberal to become a conservative thanks to our new outpatient surgical procedure!
You are so right. Slashdot's standards are obviously falling. I mean, a year ago, a good hack took seven lines of code to merit frontpage news. Now it only takes two.
I predict the next great hack frontpage story to be "Linux in one really huge line of Perl".
J
Freetype DOES interprete hinting, if you enable it by changing 5 characters in the source code.
Well, people, if the patent is not valid where you live, mainlya here in Europe, get these updated RPMS for SuSE I made. No guarantees, they work for me and the hinting works in them.
http://hippokrates.jura.uni-mannheim.de/
Moritz
It drops into debian unstable very nicely, but what then? I tried enabling the libgdkxft library using the GNOME-AA session via GDM, and the AA fonts looked nicer (I think). Is this what is needed? It doesn't make any change in the non-AA session...
The problem is that I think my XftConfig is messed up as the fonts displayed in the console (powershell) are ugly, leave remenants, etc.
Can anyone give a geek a hand?
I just gave it a try and I must say that it looks frickin' horrible compared to the aa done in KDE/QT. I had to back it out to make the aa fonts on my system look better and more readable. Looking at the xft-based aa fonts from the hack made me think my glasses prescription was f*cked or that I had scum in my eyes.
Nice try and all but until it can do it as well as QT, it isn't ready for primetime.
In Bushworld, they struggle to keep church and state separate in Iraq as they increasingly merge the two in America.
Some printers do vary the dot size to achieve a sort of anti-aliasing.
That's fundamentally different from antialiasing. That technique can best be described as "smoothing."
I tried using ASCII art to show the effect of smoothing, as distinct from antialiasing, but I got frustrated and gave up. Suffice it to say that antialiasing uses oversampling and averaging, while smoothing simply attempts to fill in the corners that look too jagged to the eye.
Fairly crappy explanation, but I'm too sleepy to write a better one.
Ah, so blurry text is an "aesthetic result"?
"Anti-aliasing" just means blurring, and is in general not a good thing. And this particular hack turns off hinting, to make it every blurrier.
Like headaches? Install this.
Tom Swiss | the infamous tms | my blog
You cannot wash away blood with blood
when it comes down to it, HERE's an actual Mac OS9 screenshot to compare to the Xfree anti-aliasing. notice that OS9 doesn't anti-alias text below (user settable) 12 points (handy, and faster). i've set the browser font to be: Times-12 -> imo, after examining both the X shot and this shot at 400% magnification, it seems to me that the hinting and definition of the MacOS still yields clearer text. someone might also want to post up a OS-X and XP screenshot of the same web page: http://salon.com/ent/feature/2002/03/02/shakespear e/index.html
so we can have a REAL comparison of actual screenshots instead of a lot of /. theorizing about about the Nyquist limit.
regards,
johnrpenner.
when it comes down to it, HERE's an actual Mac OS9 screenshot to compare to the Xfree anti-aliasing.
notice that OS9 doesn't anti-alias text below (user settable) 12 points (handy, and faster). i've set the browser font to be: Times-12 -> imo, after examining both the X shot and this shot at 400% magnification, it seems to me that the hinting and definition of the MacOS still yields clearer text.
someone might also want to post up a OS-X and XP screenshot of the same web page:
http://salon.com/ent/feature/2002/03/02/shakespea
so we can have a REAL comparison of actual screenshots instead of a lot of
regards,
johnrpenner.
Um, care to post a link on some info about one of these machines? The only typesetters I've ever dealt with (or heard of) are all bitmapped (albiet at very high resolution: 2400dpi or slightly higher).
-- It only takes 20 minutes for a liberal to become a conservative thanks to our new outpatient surgical procedure!
Fonts that are hinted for screen display shouldn't be anti-aliased at small sizes. It makes them blurry. The font author has already essentially laid out the pixels exactly as they should appear for those sizes. At least give people the choice. (Do you play anti-aliased NES games on your emulator, or do you leave the pixels as-is?)
Second, it would be nice to have "ClearType" (that is, sub-pixel AA) on linux, too. Is anyone working on this?
Freetype is a library for supporting TrueType fonts only. It may or may not support anti-aliasing, but its scope is limited to a subset of the fonts used with X. Type 1 fonts are not affected by FreeType, neither are bitmapped fonts.
By the by...exactly WHERE did I say ANYTHING about Gnome in my original post? Nowhere. YOU took what I said, a fact that QT-based aa (which predates Gnome aa, by the way of another fact) looks better than what happens after using the libXft altered lib. You seem to have a chip on your shoulder, assuming a Gnome attack where there wasn't any.
I reported a fact. Plain and simple. I did not mention Gnome at all. I don't use it and couldn't care less how it does anything so there was no point in my holding your defensive hand.
In Bushworld, they struggle to keep church and state separate in Iraq as they increasingly merge the two in America.
This is great stuff, well done. It is also a perfect illustration of the dangers of using a misunderstood technology; hinting. Hinting was originally designed to help non antialiased fonts shift character vectors to align with discrete pixels for a more recognizable character description. It's application to antialiased fonts was foolish and never worked because the antialiasing is perfect for displaying the subpixel hint shifts being applied and makes the fonts look extremely ugly. Hinting on antialiased fonts was a complete misapplication of an earlier display kludge.
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.
But, ultimately, font smoothing and anti-aliasing are limited techniques: a gray square just isn't the same as a white square with a thin black line running through it, no matter how much processing you do to decide on the shade of gray.
XP's smooth font crap bugs the hell out of me it just looks like blurry text to me
http://Lenny.com
I know it increases the sharpness of the characters, unfortunately the fools who implement this miss the point that to do so it moves the fonts by subpixel ammounts and when you mess this up it looks abominable.
I know the issues about subpixel positioning etc, I'm a graphics programmer and have been for about 15 years. I am gurrently working full time on image processing software.
The imprecision in the shape is awful and get's worse the smaller you go. GO look at the results instead of banging your sharpness drum. What good is sharpness if your edge is in the wrong place? This attempt to defeat Nyquist is an abomination and produces incorrect and ugly results, this has just been proven in spectacular fashion.
I find that anti-aliased fonts are a real drag to try to read. I wish there was some way to shut off anti-aliasing in MacOS X. The anti-aliased fonts are more mathematically correct renderings of font glyphs represented mathematically, it's true, but they just look blurry to me.
It used to be that people would spend a lot of time hand-optimizing a font to look good on screen. This is definitely costly, and I can see why one would want to teach a computer to do it nicely, but anti-aliasing doesn't seem to be a good answer to me.
Am I crazy, or do other people have the same experience with anti-aliased fonts? I'm using MacOS X, by the way, and the output looks a lot like the "after" output in the article, so I don't think I can blame my problem on a bad anti-aliasing algorithm.
Ink is a real physical liquid and paper is porous. What do you think happens with ink on paper? It bleeds out a little, randomly, you will never get two "pixels" the same. Thus the "jagged staircase" effect is slightly reduced.
1. Laser-type printers don't actually use ink. They use a powdered toner that can be affixed to the paper in very precise ways. Toner affixed by a laser doesn't bleed.
2. Quality control is a huge part of the commercial printing process. Colors and tones are expected to be visually indistinguishable from press to press, and from run to run, and from sheet to sheet. While it's true to say that no to spots are ever absolutely identical, they're much, much closer than you think. Look at two samples through a loupe sometime.
3. This has nothing to do with antialiasing.