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.
the first link autocloses the window...
And am I the only one that thought "Wow, Blizzard stopped coding for WarCraft 3 to help Mozilla out?!?"
Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
LCD optimizations? what are these, and how can i get them? and are they sexy?
why is this patch HUGE compared to the older one that often gets supplied with the libgdkxft.so that you preload?
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!
Whoopee.... blurry text, just what I needed.
Luckily I never load Render & I never intend to - after about 5 minutes of looking at KDE with it enabled I had a bad headache. That font smoothing stuff is *really* hard on the eyes.
I remember when the old archimedes did the same thing... it kinda worked there because they were crappy monitors anyway. With a sharp 17" it's not an improvement.
While I like the idea of making my Mozilla browsing experience more aesthetically pleasing, I am not willing to sacrifice stability.
This new patch is great, but you shouldn't update yet. Wait until it's merged into the official release. Unless, of course, you like to try out new things, in which case go get the update.
Anyway, I look forward to getting the final version of this. (Until then, I'll just have to buy a bigger monitor.)
Not Linux, young troll, Mozilla. Anti-aliased fonts have been available for quite a while in KDE and Gnome. Speaking of which...is it me, or does Netscape 6.2 already support anti-aliased fonts?
In any case, I'm still waiting for important stuff, like multipe consoles and desktops, good memory management, remote graphical apps, etc. to be standard features on Windows...
Reminder: find a new sig
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.
The hope is to have a patch of less than 100 lines; currently it's more like 400 lines
Why don't you concentrate on making sure the code works instead of aiming for some arbitrary patch size?
Look here. This is with the version of mozilla included in Debian unstable, patched to work with the gdkxft hack. The real question is will this new patch actually be included in any commonly distributed Mozilla binaries. Because if it isn't, I don't think many are going to recompile the whole damn thing just for anti-aliasing (but that won't stop people from complaining about the lack of it!).
"(Man) tries to live his own life as if he were telling a story. But you have to choose: live or tell." --Sartre
What I think people should keep in mind is that you are comparing a multi-billon-dollar corporation with access to all kinds of patents and trade secrets to what *volunteers* do in their spare time. Keep in mind access to good fonts are what corporations like Microsoft and Apple *slow down* to keep people on their platforms.
If you want to stick your head out against possible liability so others can *freely* use something be my guest. At least don't criticize when others do.
And does windows already have this...
Font Smoothing has been available to Windows since at least OSR2 (or Win95 with Plus). ClearType further extend this in Windows XP, and it looks REALLY nice.
X11 as others have pointed out, does in fact have support for font antialiasing. For whatever reason, Mozilla apparently needed a patch in order to take advantage of it. I'm not too sure what the technical reasons are that all applications don't just automatically take advantage of it -- but I'm sure there are people who would be willing to clearify that.
"Everything you know is wrong. (And stupid.)"
Moderation Totals: Wrong=2, Stupid=3, Total=5.
Correct me if i am wrong, but isnt the framebuffer just a buffer ? that gets send to the videocard in a sertain way ?, yeah oke its a Grapical Function/Feature, but not a GUI ( Grapical User Interface ). Its just a layer to put an GUI interface on, Xft adjusts only the GUI interface not ? The framebuffer hasnt got functions to display text i hope, but i could be wrong...
:)
Quazion.
Ps. sorry but i am a bad mood and yes i never played with the framebuffer before, i really love X
Great, I would really love to see a solution which gives me non-ugly italic fonts (especially in my webbrowser) with Linux.
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.
I believe 0.9.8 is due out tomorrow. Is anyone else foaming at the mouth for this release like me? :) Can't wait... well I can wait long enough not to download nightlies and pretend it's the real release.
v2sw7CUPhw5ln6pr5Pck4ma7u7LFw0m6g/l7Di5e6t5Ab6TH.
No matter what gets said here about feature bloat and endless delays, Mozilla is just the coolest and most ambitious browser out there. At this rate it's well on its way to becoming the Emacs of the browser world, and it might even be there now. I've been using it as my main browser for god-knows-how-long. It's been fascinating to watch it evolve from the early milestone releases up to now.
Hell, Mozilla's never going to be finished, and I don't really care to see it finished either. I'd have to find a new religion.
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
--
Even if Linux desktop installations weren't so horribly deployed as they are by most distributors (I completely lost faith in SuSE after their handling of the Euro-Sign, I think that they are no longer interested in ordinary desktop users), anti-aliasing algorithms itself could probably be much improved, although the Freetype page points out that Apple patents are a problem and some features had to be disabled (damn you, Apple!). All in all, I'm not happy with anti-aliasing support at all, except for subpixel rendering, which works very well on my Notebook. (And don't give me the "You didn't pay, don't complain" bullshit -- I paid a lot of cash to distributors already, but they seem to prefer to spend it on the server end).
I'm guessing what I need to do is get a fresh mozilla sourcebase from CVS (just updated to 0-9-8 branch), apply Blizzard's patch (change some paths), get keithp's "fonts" directory from his CVS, build that, then build mozilla..
Anyone actually get it built?
"extreme performance sacrifices"?
That really funny. In my experience, X has always been faster than WinXX on comparable hardware. This is even true if you add in bloated desktops like KDE or GNOME. OTOH, WinXX doesn't have the inherent flexibility to allow for the seamless use of alternate desktops. (so much for "standards")
Let's not even get into any version of WinXX where the comparison is remotely fair. Add on reasonable robustness and Windows starts to get really slow and bloated.
Linux has always had VM support to equal or rival any version of windows.
Besides, individual fonts are much more important than the underlying "font technology".
A Pirate and a Puritan look the same on a balance sheet.
Recruiting others would be easier if I could say, we only need 19 thousand more people.
In any case thanks.
Novel theory: Modern Man evolved from psychopath
user_pref("font.minimum-size.x-western", "10");
h ic al", false);
e d_ support", true);
o ns -per-proxy", 24);
o ns -per-server", 12);
:).
of course most cool award goes to:
user_pref("dom.disable_open_during_load", true);
(no popups onload from javascript but clicked popups still work)
also good:
user_pref("image.animation_mode", "once");
user_pref("network.http.max-connections", 128);
user_pref("network.huser_pref("mail.quoted_grap
user_pref("mail.display_glyph", true);
user_pref("mail.quoteasblock", true);
user_pref("mailnews.send_plaintext_flowed", true);
user_pref("mailnews.display.disable_format_flow
user_pref("mail.display_struct", true);
user_pref("mail.send_struct", false);ttp.max-connections-per-server", 48);
user_pref("network.http.max-persistent-connecti
user_pref("network.http.max-persistent-connecti
On *nix go to ~/.mozilla/default/something_random/ and edit prefs.js - note, copy it to prefs.js.new, edit it, close mozilla, copy it over prefs.js, restart mozilla, tada (if you edit it while moz is open it'll kill your new prefs.js version because it writes it out on exit or something).
Under Windows go to \Documents and Settings\ to your directory (make sure you have "show all files" in the folder prefs) and you'll find it. Or use that search feature
Normal screens do draw a round dot but there is the phosphor mask in front of that which are the pattern you see, diffraction by the screen makes the dots themselves overlap. On modern screens each pixel is then a blurry overlapping circle cut out of a pattern of vertical stripes of red, green, and blue. There is probably a way to take advantage of this for improved antialiasing but there seems to be no control over the exact registration of this pattern with the dot location, unlike the LCD.
This won't help the end-user much, but it is a huge deal because it removes the main impediment stopping all programs from immediatly switching to xft.
Normally when somebody makes an "extension" to an existing interface they write it so you cannot use the "extension" without also updating what you are talking to. This means that anybody writing a program using the new interface either has to say "you have to update your drivers" which is user-unfriendly, or they have to put in a big mess of code to "detect" the extension and then have to write two interfaces, one using the extension and one not. The real result is almost nobody uses the extension because it it too much of a pain to write to.
X is horrid with these things. Shared memory images (an interface now 15 years old) required you to detect whether the server did it and write totally different code for non-shared. The result is that the majority of programs don't use shared memory images. If they had written the detection and emulation into it, I'm sure *EVERY* program would use shared images today.
Congrats to Keith Packard for figuring this out!
Now lets see the same thing done for the rest of XRender, so we can get anti-aliased lines and shapes without having to write everything twice.
XRender provides an all-new and much nicer interface to fonts, and it makes sense for programs to use it. However it would be nice to see a rewrite of Xlib so that attempts to use old font calls cause emulation code to be run that draws Xft fonts.
MicroSoft deserves credit for implementing anti-aliased fonts while both Mac and X people were convincing themselves it was impossible or too slow. They also deserve credit for having the balls to change their already existing font interface to draw the new fonts, despite the fact that some programs that depended on the exact pixels drawn would break and make people mad. It did help them that thier font interface sucked less than 1/10th as much as Xlib, though...
match any pixelsize > 8 any pixelsize < 15 edit antialias = false;
This goes into ~/.xftconfig or into /etc/X11/XftConfig.
The problem with AA fonts in X, to me, is that they anti-alias all fonts, even the tiny ones that are hand-hinted to look good when pixels are scarce. Verdana 10 pt looks shitty when it is anti-aliased, for instance.
However, for large fonts, I don't think there is much question that anti-aliasing really helps. The X guys should do the same thing that Windows does and only anti-alias fonts after a certain size. (Or at least make it configurable on a font-by-font and size-by-size basis.)
(XP's cleartype on LCDs is a different story; I'm not sure how I feel about that at small sizes yet.)
Whilst I agree with other comments that point out that Mozilla really is pretty crash-proof already, you might like to follow the Total Recall project on mozdev...
I'd really refrain from editing the prefs.js file directly. Instead, just create a file in the same directory called user.js and store your custom preferences there. user.js is parsed after prefs.js , and is not modified by the GUI when you alter preferences, so if you mess up it's much easier to fix. (And, conversely, you're guaranteed that the GUI won't mess it up for you.)
I can understand that X fonts originally were simple bitmaps that got rendered directly to the screen. But the X server knows what kind of visual is being rendered to, so I don't see why it can't render in a more sophisticated manner when drawing to a visual with at least 16 bits worth of color depth.
Were the original designers of the font rendering mechanism so braindead as to specify that all fonts forevermore would be bitmaps??? What the hell for???
As for the X font protocol, that's easy: design an upgraded protocol that the X server can also deal with, that's used to transmit font information along with transparency information. Or use a separate channel for the transparency information and keep the bitmap protocol the way it is.
But either way, font rendering belongs in the server, and having the client do it is complete nonsense.
I mean, the GC is an opaque data type, as is the Font, right? So what's to prevent you from having a mask with a depth greater than 1, which is created when you use XSetFont() with a font that has alpha information?
Help! I don't understand!!
Use 'slashdot stuff' in the subject line in any email you send me if you want to get past the spam filter.
It looks like Micro$oft patented it [uspto.gov]. Can you use it in an open source software without being processed?
Given that MS have stated over and over to both other people and their own employees that they only use patents defensively -- eg. if someone sues them for patent infringement, they'll dig through their patent list and attack that company back with all the ones that they have infringed.
Of course, there's a certain amount of risk to just ignoring it. You could always license the patent. *shrugs*
Simon
Coming soon - pyrogyra
While it may be a closer approximation of what it will look like on print, its just an illusion. Anti-aliasing *is* blurring. While unantialiased(?!) fonts may be uglier, they are easier on the eyes.
Did you open up the file again and double check it's still set? I went to the link and I didn't get any popups - I did have Mozilla itself popup and ask if I wanted to get the java plugin (not installed). Perhaps this java thingy they have on their site opens the windows?
Anyway, see the other reply about users.js or whatever it's called. If you are already using that maybe try adding it to prefs.js and see what happens.
Sure - but wait for the APIs to stabilize and everything to get sorted by 1.0, and then mozdev-type projects will properly take off!
Um, MacOS >= 8.5 has supported antialiasing by default since 1998, and there was defacto support even earlier than that in Adobe Type Manager 3.x and up, IIRC. The CoreGraphics (Quartz) antialiasing in OSX is visually far superior to what was available in Classic, but AA in general certainly not a Johnny-come-lately feature on Apple's platforms.
Isn't 1998 later than when MicroSoft did it? I may be confusing the dates, however.