Re: [Nautilus-list] Xft Anti-aliasing, Libart antialiasing?



OK, silly me.

http://mlei.mtmis.com/nautilus2.png

nautilus.png was, in fact, a larger font than what was used in the
original jpg. I forgot to match the font size again when I did the second
screenshot.

nautilus.png: Xft uses font size 11
nautilus2.png: Xft uses font size 10

Thanks for all the comments that I've been receiving on this. In fact,
I've been finding it really hard to keep up with responding to all of
them-- I keep receiving more email as I am writing replies.

One question before I go on... so is libart in on this or not? (I'm
wondering if all these emails are really relevant to Raph). Darin, who
might know about the routines in librsvg and eel that you mentioned that
handle text?

Alex Larsson wrote:
> > This is, of course, subjective, but it is obvious to me that 1) the output
> > is not identical and 2) the output on the right is smoother and more
> > readable. Look especially at the curve of the capital G.
>
> It looks like the gdkxft font is hinted, but the Nautilus one is rendered
> completely unhinted. You can tell that especially by looking at the i's
> and the l's. In the Xft rendering these are completely non-aa, since the
> hinting made them the grid-aligned. The nautilus one is instead blurry on
> the sides, because the letters are really slightly wider than 1 pixel.
>
> I dunno which is best. I'd say the nautilus output looks smother, but the
> Xft output is more readable. I mean, look at the second 't' in nautilus.
> It's mostly a blob.

I think the "mostly a blob" comment is due in part to the jpeg being quite
lossy and blurry. Take a look at the png.

Hinted and unhinted certainly seems like a plausible reason for the
difference. What could be the cause of this discrepancy (between hinting
and no hinting)?

Going back to David's earlier comment that the Nautilus rendering looked
like a paper rendition, I am interested to know if the hints are dependent
on the resolution of the medium, i.e. Would a 12pt Arial on paper be
hinted the same way as a 12pt on screen?

Now, the biggest question for me is: which causes more eye-strain? IMO
this should be the deciding factor in choosing which is the "right" way.

I've already said that the Nautilus rendering seems to strain my eyes
less. (As an aside, OpenOffice apparently does the same thing as Nautilus
in regards to anti-aliasing.) Now here's my theory on why there may be an
appreciable difference in eye strain. I'm obviously no expert in optics,
and I'm making a few assumptions here, so *please* correct me if they are
wrong. I'm assuming that the gdkxft rendition is in fact hinted, while the
Nautilus one is not, and also that hinting depends on the resolution of
the medium.

So when the letters are hinted, they are hinted in a way that 1) optimizes
them for readability as aliased, monochrome text and 2) optimizes them for
that specific screen resolution. But when the antialiasing is done on top
of these hinted letters, the net effect that one would want to generate is
to focus the eye as if the screen was at a *higher* resolution. Thus, the
eye is trying to see the letter in two resolutions at once, generating eye
strain.

When the letters are unhinted (or hinted according to a higher resolution
medium, whichever the case might be), the antialiasing does a much better
job because it represents the curves as they would be on a high resolution
medium, which it is trying to emulate. Thus the eye focuses the text as if
it were at that high resolution so that there is less eye strain.

OK, that's my take on it. Darin, I don't know that the gtk-devel-list
people would know any more, since Xft is really the library that does the
actual rendering, not GTK or Pango, afaik.

Further comments welcome, and apologies for the longwindedness of the
response.

Moses





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]