[cairo] Banker's rounding problems and Nautilus
Behdad Esfahbod
behdad at behdad.org
Tue Dec 5 12:11:49 PST 2006
On Tue, 2006-12-05 at 14:24 -0500, Owen Taylor wrote:
> On Tue, 2006-12-05 at 14:14 -0500, Behdad Esfahbod wrote:
> > On Fri, 2006-12-01 at 20:35 -0500, Carl Worth wrote:
> > > On Wed, 29 Nov 2006 18:24:14 -0800, "Daniel Amelang" wrote:
> > > > > Oh, and I've also gotten feedback about a pretty bad text positioning
> > > > > bug for the text nautilus is drawing on the background window. I think
> > > > > that's a problem from the new banker's rounding, but I'll bring that
> > > > > up in a new thread.
> > >
> > > So the bug has already been reported with a nice screenshot here:
> > >
> > > Update to cairo-1.3.4 worsen font rendering
> > > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=217819
> > >
> > > The problem with bankers' rounding being used during text positioning
> > > is that it's not invariant under translation. So when the text is
> > > drawn once in black, and then once again with an offset in white, (for
> > > the drop-shadow effect), it is getting rounded differently.
> > >
> > > Meanwhile, within a single word, you can see "extra space" being
> > > inserted between letters, (as if one is getting rounded left while the
> > > next is getting rounded right). I had understood Behdad to say that a
> > > pango-using application would be using only integer metrics, so I am a
> > > bit surprised to see this problem.
> >
> > So yeah, my bad previously. Seems like in None and Slight hinting modes
> > in gnome-font-properties, you get non-integer metrics.
>
> If that's the case, it's a bug. It needs to be fixed, not worked around
> somewhere. (In fact it's a bug popped up about a year ago and was
> supposedly fixed.)
>
> Metrics should be hinted without regard to the gnome-font-properties
> settings ... a lot of apps can't handle non-integer metrics.
Yeah, that's what I remember too. No idea what's going on. Looking
into it. Still, Banker rounding is probably a bad idea.
> - Owen
--
behdad
http://behdad.org/
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo
mailing list