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."
Broken HTML (Score:0, Informative)
ClearType? (Score:4, Informative)
good, but not quite excellent.. (Score:5, Informative)
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 (Score:5, Informative)
Re:ClearType? (Score:3, Informative)
just the hinter (Score:5, Informative)
Re:good, but not quite excellent.. (Score:5, Informative)
Hmm, I guess we don't do real time text then, damn, I was pretty sure that was what I did, certainly looks like it, I must have been dreaming...
Of course, there IS a difference when you need to display a full page of scrolling text at speed, but since characters are normally only rendered once each, and then cached, the processor time required to do high quality anti-aliased text is actually very very small in relation to just about everything else (laying out the text is a much more processor intensive task for most uses).
The time required to properly alpha-blend it is a little higher (depending on the windowing system and graphics hardware), but still not that great.
One BIG thing that gets missed is the fact that antialiasing for LCD is quite different from antialiasing for trinitron, which is quite different for antialiasing for a standard CRT, due to dot placement/shape, and that also makes quite a difference (I believe microsoft has an LCD mode, and freetype can do one, from memory).
Re:ClearType? (Score:5, Informative)
Greetings. (Score:5, Informative)
Here's another mirror [geocities.com]. 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
Re:Why is font rendering in X so bad? (Score:3, Informative)
Most people believe it.
It's possible to get fonts to look correct... My fonts look fine. The real trick I think, is to get fonts working right by default.
Xft and fontconfig (Score:4, Informative)
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.
Re:ClearType? (Score:4, Informative)
--Ben
Re:Above is now a Complete Mirror (Score:2, Informative)
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- [slashdot.org], 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 [sourceforge.net] or with the W3C validator [w3.org].
Re:Font rendering in the X server (Score:4, Informative)
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
This doesn't seem to be a problem since most populair toolkits already support the Render extension. Remember, RENDER is a completely new rendering system for X, not just anti-aliasing.
If there was great demand for this it would already have happenend don't you think? Changing the Xaw toolkit to support RENDER would not be too hard I think.
-adnans
Re:Linux/X86 configuration standard needed bad (Score:4, Informative)
It could have taken you one Google search for "xfree86 subpixel rendering" to find this [jmason.org] link!
-adnans
Re:AA text fuzzy? (Score:3, Informative)
--Ben
Re:My AA issue (Score:2, Informative)
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 [jmason.org]
It makes mozilla look really pretty =)
Re: Shitty browser (Score:4, Informative)
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...
Plain XFT looks better (Score:2, Informative)
on my LCD screen right now, but the 'after' images
look much worse than the regular XFT rendering to
me.
Re:Disabling hinting is NOT the way to go (Score:3, Informative)
TrueType fonts have bytecode with hinting information that can be interpreted by the renderer. This is what freetype-2.0 did up to version 2.0.1. Due to patent issues this feature was turned off by default in version 2.0.2. All newer versions of freetype use something what they call autohinter. While this gives better results for badly hinted or unhinted fonts, it does not (yet) achieve the excellent results you get from using the hints embedded in well-hinted fonts.
The solution is thus not to disable hinting but to enable the bytecode interpreter in your freetype2 libs. Of course you also need some decent fonts.
Re:ClearType/XFree comparison (Score:2, Informative)
Re:Why is font rendering in X so bad? (Score:2, Informative)
It has a lot of information on font rendering in X11 and following its advice can really make a big difference in improving the look of the fonts, (especially in Netscape I found).
-Bruce
Re:Disabling hinting is NOT the way to go (Score:3, Informative)
The right solution is to recompile freetype with the patented hinting turned ON, and the automatic hinting engine turned OFF. It really looks good, way better than either of that guy's screenshots.
Re:Gamma curves and antialiasing (Score:3, Informative)
V = B < .04045 ? v/12.92 : pow((v+.055)/1.055, 2.4)
Re:Font rendering in the X server (Score:3, Informative)