px to twip rounding error causes pt sized fonts too small

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

px to twip rounding error causes pt sized fonts too small

Felix Miata-2
I've pointed out previously that internal unit conversion causes DPI
error in Gecko, which a fix for
https://bugzilla.mozilla.org/show_bug.cgi?id=177805
should eliminate. http://mrmazda.no-ip.com/tmp/dpi-broken.html

Yesterday I discovered a distressing impact of this rounding error. When
DPI is incorrectly reported, CSS pt sized fonts are always undersized.
http://mrmazda.no-ip.com/tmp/pt2px168bug.html shows the impact at 168
DPI, which Gecko reports as 160 DPI. The really distressing part is that
it's worse in 1.9a than in 1.8. Luckily for people using such common DPI
values as 96, 120 or 144, the error is zero. Unluckily for high
resolution Linux users, their DPI is unlikely to be any of the error
free values.

I tested in FF 1.5.0.4 on WinXP and latest Minefield on Linux, confirmed
with FF 1.5.0.4 on OS/2, and controlled with Konqueror 3.4.2. Konq gets
it all correct, but Gecko in every pt size on the test page undersizes
by 1px or 2px or more, depending on whether the mathematically correct
pt to px conversion results in an integer.

What have we done on the trunk to make this worse?

Anyone know if bugzilla has an open bug directly on point?
--
"All have sinned & fall short of the glory of God." Romans 3:23 NIV

 Team OS/2 ** Reg. Linux User #211409

Felix Miata  ***  http://mrmazda.no-ip.com/
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: px to twip rounding error causes pt sized fonts too small

Boris Zbarsky
Felix Miata wrote:
> What have we done on the trunk to make this worse?

No idea.  If you file a bug with a testcase, a regression range could probably
be determined.  You could do that yourself, using builds from
archive.mozilla.org...  That would go a long ways towards answering the "what
happened" question.

My guess is "cairo", frankly...

> Anyone know if bugzilla has an open bug directly on point?

Not that I know of.  I'd just file one -- better to have a duplicate than to
have no bug report at all.

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: px to twip rounding error causes pt sized fonts too small

Felix Miata-2
On 06/06/19 16:21 (GMT-0400) Boris Zbarsky apparently typed:

> No idea.  If you file a bug with a testcase, a regression range could probably
> be determined.  You could do that yourself, using builds from
> archive.mozilla.org...  That would go a long ways towards answering the "what
> happened" question.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060406
Firefox/1.6a1 is the newest ftp build that works and does not have the
problem. --enable-default-toolkit=gtk2

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060419
Firefox/3.0a1 is the oldest ftp build that works and has the problem.
--enable-default-toolkit=cairo-gtk2

SM ftp trunk nightlies are --enable-default-toolkit=gtk2 and don't have
the problem

SM win ftp trunk nightlies are --enable-default-toolkit=cairo-windows
and don't have the problem

Before I'd file any new bug I'd wait some for further feedback here, and
then look for an existing bug already filed that covers this.
--
"All have sinned & fall short of the glory of God." Romans 3:23 NIV

 Team OS/2 ** Reg. Linux User #211409

Felix Miata  ***  http://mrmazda.no-ip.com/
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: px to twip rounding error causes pt sized fonts too small

Martijn-4
On 6/20/06, Felix Miata <[hidden email]> wrote:
> Before I'd file any new bug I'd wait some for further feedback here, and
> then look for an existing bug already filed that covers this.

Well, it's probably more wise to just file the bug, instead of
expecting to get any further feedback, because there is a real change
you won't get any further feedback on this.
I think you already have found out enough stuff to make it worthwhile
to file a bug on it.
Looking at what you found out thus far, I guess this is a gfx->thebes
bug for gtk.

Regards,
Martijn

> "All have sinned & fall short of the glory of God." Romans 3:23 NIV
>
>  Team OS/2 ** Reg. Linux User #211409
>
> Felix Miata  ***  http://mrmazda.no-ip.com/
> _______________________________________________
> dev-tech-layout mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-layout
>
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: px to twip rounding error causes pt sized fonts too small

Boris Zbarsky
In reply to this post by Felix Miata-2
Felix Miata wrote:
> Before I'd file any new bug I'd wait some for further feedback here, and
> then look for an existing bug already filed that covers this.

I don't think there's a bug covering this.  Please file the bug; attach a
testcase if possible.  This does sound like a bug in cairo; in particular, there
are at least 3-4 different notions of "dpi" around in cairo-gtk2 GFX (pango's
DPI, the DPI set in the X properties, the actual X DPI, the DPI set in Mozilla);
I wouldn't be suprised if one of the numerous conversions happens to floor or
something...  :(

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: px to twip rounding error causes pt sized fonts too small

Felix Miata-2
On 06/06/20 16:13 (GMT-0400) Boris Zbarsky apparently typed:

> I don't think there's a bug covering this.  Please file the bug; attach a
> testcase if possible.  This does sound like a bug in cairo; in particular, there
> are at least 3-4 different notions of "dpi" around in cairo-gtk2 GFX (pango's
> DPI, the DPI set in the X properties, the actual X DPI, the DPI set in Mozilla);
> I wouldn't be suprised if one of the numerous conversions happens to floor or
> something...  :(

Filed https://bugzilla.mozilla.org/show_bug.cgi?id=342207
--
"All have sinned & fall short of the glory of God." Romans 3:23 NIV

 Team OS/2 ** Reg. Linux User #211409

Felix Miata  ***  http://mrmazda.no-ip.com/
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout