Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
X GUI

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."
This discussion has been archived. No new comments can be posted.

Xft Hack Improves Antialiased Font Rendering

Comments Filter:
  • Comment removed (Score:2, Interesting)

    by account_deleted ( 4530225 ) on Wednesday March 06, 2002 @03:05AM (#3116914)
    Comment removed based on user account deletion
  • mine looks better (Score:3, Interesting)

    by Catmando ( 14234 ) on Wednesday March 06, 2002 @03:35AM (#3116958)
    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
  • by lightspawn ( 155347 ) on Wednesday March 06, 2002 @03:45AM (#3116977) Homepage
    (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?
  • by sumengen ( 230420 ) on Wednesday March 06, 2002 @04:29AM (#3117067)
    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?".

  • by kcbrown ( 7426 ) <slashdot@sysexperts.com> on Wednesday March 06, 2002 @04:47AM (#3117089)
    I've asked this before, but nobody has given me a terribly good answer yet.

    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?

  • by taion ( 304184 ) on Wednesday March 06, 2002 @05:00AM (#3117107) Homepage
    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>
  • Re:AA text fuzzy? (Score:2, Interesting)

    by Darren Winsper ( 136155 ) on Wednesday March 06, 2002 @05:17AM (#3117140)
    AA has always been a matter of preference. My first computer had RISC OS on it, which had anti-aliased font rendering by default from the get-go. I guess I just got used to it and expect it. The one place I don't like AA is in my X terminals, which is funny since the one place RISC OS never had anti-aliasing was its command line :)
  • by dcstimm ( 556797 ) on Wednesday March 06, 2002 @05:43AM (#3117174) Homepage
    Gentoo.org already has this in its latest emerge rsync! GO get it! it works great I am using it now!
  • by malice ( 82026 ) on Wednesday March 06, 2002 @06:52AM (#3117334) Homepage
    For comparison sake, here are screenshots of the same page using Mac OS X's font smoothing. I wasn't able to get a font size that matched the screenshot exactly, so made two: a smaller font than the Xtf hack image, and a larger font then the Xtf image:

    Overall, the Xtf hack does look quite nice. To my eye, the OS X renderings are still a bit more aesthetically pleasing, but the Xtf hack definitely improves things quite a bit.

  • The truth (Score:5, Interesting)

    by nomis80 ( 181676 ) <(gro.08simon) (ta) (08simon)> on Wednesday March 06, 2002 @07:56AM (#3117453) Homepage

    Fact 1: Hinting [microsoft.com] improves font legibility at smaller sizes.

    Fact 2: Freetype doesn't interpret [sourceforge.net] the bytecodes in the fonts that are needed for proper hinting because of patents [delphion.com] detained [delphion.com] by Apple [delphion.com].

    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 [linuxquebec.com] for Mandrake 8.1 [linuxquebec.com] and Redhat 7.2 [linuxquebec.com] of the Freetype library with the patented bytecode interpreter enabled.

  • by heroine ( 1220 ) on Wednesday March 06, 2002 @09:42AM (#3117795) Homepage
    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.

  • by evbergen ( 31483 ) on Wednesday March 06, 2002 @10:02AM (#3117920) Homepage
    I agree. Your last remark (the need for server-side toolkits) also hits home IMHO, and I'd suggest a few more things for them:

    1. the elements in these toolkits must be able to be defined in terms of server primitives orother elements, using a platform independent special-purpose language. And not only their appearance but also where simple interactions are concerned, such as a 'down' button that moves a slide down and a scrollable view up;

    2. the server must be able to receive these definitions from the client itself or to fetch it from an external source on behalf of the client (honor server security by making sure the definition language's scope is limited to the user interface only);

    3. the server must be able to cache these elements using unique identifiers by which they can be referenced. These should have two parts: a functional part and an appearance part. Clients specify an element's functional part as a requirement, and its appearance part as a hint, in order for users to be able to provide alternatives (i.e. theme support);

    4. a proper encryption and authentication model for the X channel.

    This makes the server able to operate more independently, instead of requiring a round trip to the client for every simple operation, making operation over low-security, low-bandwith, high-latency networks such as the internet *much* more practical.

    Potentially, this would provide a lot more elegant distributed computing model than the whole mess we have now for exporting user interfaces, with http, html, the DOM, jscript and all those gross hacks that seem impossible to get right if you look at today's browsers.

    What do you think?
  • by saintlupus ( 227599 ) on Wednesday March 06, 2002 @10:14AM (#3117990)
    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
  • by johnrpenner ( 40054 ) on Wednesday March 06, 2002 @02:37PM (#3119882) Homepage
    when it comes down to it, HERE's [earthlink.net] 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 [salon.com] so we can have a REAL comparison of actual screenshots instead of a lot of /. theorizing about about the Nyquist limit. regards, johnrpenner [earthlink.net].
  • xp (Score:2, Interesting)

    by LennyDotCom ( 26658 ) <Lenny@lenny.com> on Thursday March 07, 2002 @12:43AM (#3122974) Homepage Journal
    XP's smooth font crap bugs the hell out of me it just looks like blurry text to me

Genetics explains why you look like your father, and if you don't, why you should.

Working...