Closed Bug 342207 Opened 13 years ago Closed 10 years ago

pt sized fonts wrong when px to twip rounding error causes DPI error

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mrmazda, Unassigned)

References

()

Details

(Keywords: regression, testcase)

Attachments

(6 files)

Above URL tables the px to twip rounding error impact on DPI that would presumably disappear with a fix for bug 177805. Because of the anticipated fix for it, it is only because of a worsening of the error and subsequent newsgroup request to file a new bug that I do so here.

When operating DPI is a value other than one of those with no px to twip rounding error, pt sized fonts may be rendered at a smaller px size than the px size that correctly computes for the actual DPI and pt size requested. This is obvious in the UI, where other apps' menu fonts are actually rendered at 10pt, while in Firefox, the menu fonts are 1px-2px or so smaller. I see this daily running 168 DPI in SuSE 10.0/KDE, where Gecko reports 160 DPI while the actual DPI is 168.

This error is present in all 1.8 and 1.9a builds tested on Win, OS/2 & Linux, but got worse in Minefield Linux built with --enable-default-toolkit=cairo-gtk2. SM trunk doesn't show this in public builds apparently because they are instead built with --enable-default-toolkit=gtk2.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060406 Firefox/1.6a1 is the newest ftp build I could find that works and does not have the worsened 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 I could find that works and has the worsened problem. --enable-default-toolkit=cairo-gtk2

news://news.mozilla.org:119/DaednYUupt7kqgvZnZ2dnUVZ_tGdnZ2d@mozilla.org is my original newsgroup post that precipited filing this.
Notes at bottom of page explain how to interpret. Konqueror correctly renders as matching sizes all green/double bordered div content paragraphs, each of which contain correctly computed equivalent px and pt sizes. In no 1.8.x or 1.9a Gecko I loaded it in do any of the sizes within the green match.
Keywords: testcase
Anyone who wants to look at this by forcing X to a particular DPI instead of just Gecko may want to use a DisplaySize setting in xorg.conf to do it. I have many of those listed for convenience at http://mrmazda.no-ip.com/tmp/DisplaySize .
Keywords: regression
Rendering error is undersize when reported DPI is low (e.g. 168 -> 160 DPI), and oversize when reported DPI is high (e.g. 108 -> 111 DPI).
Summary: pt sized fonts too small when px to twip rounding error causes DPI error → pt sized fonts wrong when px to twip rounding error causes DPI error
Notes at bottom of page explain how to interpret. Konqueror correctly renders
as matching sizes all green/solid bordered div content paragraphs, each of
which contain correctly computed equivalent px and pt sizes. In only some sizes for some desktop environments, 1.8.x and/or 1.9a Gecko are correct.
Some sizes OK, some not. For some 1.8 & 1.9 match, for others not.
All sizes on both 1.8 & 1.9 are correct from 13pt on down, but then things go haywire.
I don't really see any pattern in this mess.
Very few sizes correct.
OS: All → Linux
URL is returning 404.  Please reopen if the bug still exists.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INCOMPLETE
URL changed, same content. Testing with 3.0.10, looks like 177805 fixed it.
You need to log in before you can comment on or make changes to this bug.