Xft Support For Mozilla
keithp writes "The results of a few short hours of hacking by blizzard (with a bit of help from me) can be seen here." According to Keith, "The hope is to have a patch of less than 100 lines; currently it's more like 400 lines. ... The patch uses a new version of the Xft library available at
http://keithp.com. That will be integrated into the XFree86 CVS tree after 4.2 stablizes; the existing Xft library will remain in place for backwards compatibility. One feature of the new library is that it works with older X servers that don't have the Render extension, providing AA text (including the LCD optimizations) for any screen with a TrueColor visual." Chris Blizzard provided a link to the patch itself, as it stands right now.
This patch looks very promising. One of windows XP's big claim was better LCD support; they are right, it does look quite sharp on any type of square pixel display.
As I'm sure most of you know, most monitors use round pixels, whereas most LCDs use square or the more typical rectangular pixels. So what this means from a GUI standpoint: You need to optimize for the output device. The end result in the screenshot looks GREAT.
Good work guys!
It anti-aliases your GNOME widget fonts and there is a separate patch for Mozilla (good up to 0.9.6), which works nicely with Galeon, BTW.
Check it out.
Yea, the tree closed for 0.9.8 like a week ago. Tree Closes for 0.9.8. For those that don't want to click the link, here's what it says...
...0.9.8 will have a variety of new items including new natively drawn widgets on WindowsXP, Mac OS X, and GTK, when you are in the classic skin (We will have more on this later, including screenshots)...
:)
If you're really interested in what's going on with the project, try the latest Build Comments
Yesterday was the last of the frozen trunk builds. And if that's not enough, the Tree Is Opened for 0.9.9 checkins.
And there's now a Mozilla 1.0 Manifesto that lays down precisely what Mozilla 1.0 should be (which will come right after 0.9.9).
Of course, it's nice to see a change in SlashDot change its view of the project. But, then again, maybe I was right all along.
It's not arbitrary; I believe about 3/4 of the patch consist of unnecessary changes to code that shouldn't be executed in the Xft code path. Unfortunately, the internal abstractions for dealing with fonts are somewhat strained in the current code base, making this assertion testable but not easily verified by visual inspection.
Antialiased fonts can look extremely good and
make reading less stressful for the eyes.
Look at text in newer versions of MacOS, BeOS
or Windows XP. Especially at LCD screens the
quality is absolutely convincing.
BUT you need not only a good font renderer, but
also fonts that are hinted correctly.
Xft is a simple library designed to interface the FreeType rasterizer with the X Rendering Extension.
FreeType is a software font engine that can be used in graphics libraries, display servers, font conversion tools, text image generation tools, etc. to produce high quality glyphs and characters. The important thing here is that FreeType supports Adobe Type1 and TrueType (that is, Windows) scalable fonts.
the X Rendering Extension is a protocol that represents a new way to render (that is, draw) stuff on your screen in X windows.
thus, Xft's incorporation into Mozilla gives us smooth, high quality, Windows compatible fonts while surfing the web on Linux or *BSD
--
Put this into /etc/X11/Xftconfig:
match
any size > 8
any size < 15
edit
antialias = false;
It's hard to be religious when certain people are never incinerated by bolts of lightning.
> the screen-shot still shows the flaws of antialiasing under Linux
You are right that the k and the W don't look good, but that does not have anything to do with your kernel, but rather the fact that Verdana and Times should not be antialiased at that size. Antialiasing these fonts at that size with hinting enabled is really font murder.
You don't want hinting enabled with antialiasing at that size, because hinting is a way to distort the fonts so that they can be rendered at very low resolution, and antialiasing is essentially a cheasy way to increase resolution. That is why you see the weird "k": the hints don't expect the resolution to be this high.
Here is a piece of an actual screenshot, showing Verdana mostly un-antialiased, and antialiased in the preview box in the fontselector.
As others pointed out, to match Windows in quality you will need high quality fonts. Of couse, the MS/Monotype fonts (Ariel, Verdana, Trebuchet, etc) are well done and especially well-hinted (if you don't antialias them at sizes where they shouldn't be), but actually the Luxi fonts that are shipping with XFree86 4.2 are not bad - their hints just need some work.
For fun, I hinted Luxi Sans (with the Gimp) at a few sizes. This is not a real screenshot, but it does show how it could look with better hints. (Note that the bold antialiased Luxi Serif is not hinted at all - a bit of careful hinting would probably improve it somewhat).
> anti-aliasing algorithms itself could
> probably be much improved, although the
> Freetype page points out that Apple patents
This is nonsens. The Apple patent covers the interpreter for the hints in TrueType fonts. Most distributions turn the interpreter on, regardless of the patent, and in fact the bad rendering of the "k" that you complain about is there precisely because both interpreter and antialiasing were used.