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.
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?
I thought I was going to get away with not upgrading to XFree4.2 - since my 4.1 is running rock solid on my GeForce3.
But it looks like I'll have to upgrade now - and redo all of that font junk, I hope it is a little easier this time around than the last - I can remember spening at least a couple of hours getting it to work last time......
Derek
What resolution are you running in <= 800x600 ?
I run at 1600x1200 with large, scalable truetype and type1 fonts and while without AA the fonts don't look bad, with AA the fonts appear to have perfectly, continuous, crisp edges and are not fuzzy at all.
Also, with the way XFree is set up now, you can have AA on/off for different sized fonts, so if you are at a low resolution you can turn AA off for tiny fonts and on for larger fonts.
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
Great, I would really love to see a solution which gives me non-ugly italic fonts (especially in my webbrowser) with Linux.
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.
Well, actually Microsoft only agreed to use TrueType when it came out. It was actually developed by Apple. They developed it for Windows and Macintosh in order to combat Adobe's strangle hold on the market. Here's an intresting quote on Microsoft's site on TrueType:
You can see a pretty detailed history of TrueType on this web page.
Sapere aude!
I primarily use Windows. I've been using AA fonts under WinNT/2K for years, and I can't stand looking at a screen without them. MSFT have done a good job. What I have discovered in my brief forrays into Linux, is that Mozilla seems to do a horrid job of rendering AA fonts, even with the same fonts taken from my Windows partition. I don't understand it, but the same page in Mozilla under Linux is far inferior to when it's displayed under Windows, to the extent some smaller point sizes become almost unreadable.
That may be because Windows doesn't actually 'antialias' fonts until they get way too small (less than about 4 or 5 point), or way big (bigger than about 30 point). In the middle, it takes a half-antialiasing, half-hinting approach. So curves and diagonals get smoothed, but important high-frequency information in the font (ie. horizontal, vertical lines) don't get modified.
This gives nice sharp stems in the letter I, for example. And in 'i', the dot on top is antialiased, but the rest of the font is drawn as single-pixel lines (at least, at about 10pt on my screen it is).
It's kind of clever, and works pretty well.
Si
Coming soon - pyrogyra
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
I find jagged fonts hard on my eyes, too... but I also find antialising under Linux to be hard on my eyes.
Here's an example of the Slashdot page antialiased under Mac OS X. Compare it to the example above. How come it looks so much cleaner under OS X (practically as good as printed type) than it does under Linux? Will Linux ever support this quality of antialiasing?
Well it's not too bad. Xwindows supports a generic interface for rendering things that are accelerated by hardware (falling back to software when need be). Now, please, if I'm wrong, someone correct me, but I believe that it works like this: XFT is an API for drawing fonts in XWindows - it replaces X's old font interface. XFT talks to freetype to turn a string into a vector image (font file) into a bitmap image. The bitmap image that freetype produces can either be a monochrome pixmap (what normal X font routines use) or a 256 colour pixmap with antialiasing). XFT takes the 256 colour (greyscale) image and gives it an alpha channel (through some kind of an operation like multiply or darken only in GIMP. It then passes this image to XRender to have it rendered on the screen. Right now, most QT or GTK apps use QT and GTK font rendering routines. These routines used to use the normal x font stuff... if you patch them to use XFT, they all get anti-aliasing. Mozilla has it's own widget set, so it needs it's own patch to use the better font rendering mechanisms.
The font support is in the right place, it's just that applications need to be changed to use the new, better interface, instead of the old interface that can't do hardware accelerated alpha channel stuff.
It should take a few hours only to fix this one
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.