Closed Bug 403511 Opened 17 years ago Closed 10 years ago

pt size units are too big on some machines. (DPI issue?)

Categories

(Core Graveyard :: GFX, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dholbert, Unassigned)

References

()

Details

(Keywords: regression, testcase)

Attachments

(4 files)

Attached file testcase 1
On some Linux systems (e.g. my laptop running Ubuntu 7.10), font-sizes specified with "pt" are being rendered too big. See upcoming testcase and screenshots.

dbaron says this is probably related to how we determine system DPI.

Gnome font preferences show 96 DPI on both my linux machines, but running  "xdpyinfo  | grep resolution" gives this:
 [broken machine]  resolution:    129x126 dots per inch
 [working machine] resolution:    94x94 dots per inch

The screen resolutions are as follows (if it's relevant):
 [broken machine]  = laptop monitor,   1680x1050
 [working machine] = external monitor, 1920x1200
Attached image screenshot: ff2
Attached image screenshot: trunk
Flags: blocking1.9?
So what logical resolution are we using on those machines, and what do you think we should be using?  I think we should be using 96dpi on the one where xdpyinfo reports 94dpi, and 126-129dpi on the one where xdpyinfo reports that.

(You can tell by looking at the ratio of Npt to Npx, or how many px == 100pt, etc. -- perhaps easier to tell using 'width' and colored boxes.)
FF2 both machines / FF3 working machine:
  133.3px == 100pt    -->   1.333 px/pt

FF3 broken machine:
  179px   == 100pt    -->   1.79  px/pt

(See
http://people.mozilla.com/~dholbert/tests/403511/box.html for pretty colored boxes)
Summary: font-size given in "pt" renders too big on some machines. (DPI issue?) → pt size units are too big on some machines. (DPI issue?)
> (See
> http://people.mozilla.com/~dholbert/tests/403511/box.html for pretty colored
> boxes)
> 
Attaching that testcase here.
Attachment #288337 - Attachment description: testcase → testcase 1
(In reply to comment #4)
> FF2 both machines / FF3 working machine:
>   133.3px == 100pt    -->   1.333 px/pt

Multiplying by 72, since 72pt == 1in, that yields 96dpi.

> FF3 broken machine:
>   179px   == 100pt    -->   1.79  px/pt

And this is 129dpi.

It sounds to me like we've switched to behaving correctly; I'm not sure why it was broken before (although I recall a pref being set wrong in Fx 1.5, which was before bug 327406 and friends).
FWIW, Opera and Konqueror both match FF2 (not FF3) on the "broken" linux machine.  (They use 96 dpi, not 129)
FWIW, setting layout.css.dpi to 96 in about:config makes my "broken" linux machine w/ FF3 match the other platforms & browsers on both testcases.

Regarding Comment #6 -- maybe this bug should just be marked invalid, then.

However, this fact remains:  any pages that mix pt-size text with default-size (16px) text will look weird in FF3 as compared to any other browser, on machines with strange DPI. (at least, different vs. Konqueror / Opera / FF2)  While we may be technically doing the right thing, it's possible we'll get some blame for looking wonky.

I guess this is largely just a problem with the design of those pages, though... and users can always get around it by setting layout.css.dpi manually.  So maybe it's not a big deal on our end.
Flags: blocking1.9?
Product: Core → Core Graveyard
This bug has been buried in the graveyard and has not been updated in over 5 years. It is probably safe to assume that it will never be fixed, so resolving as WONTFIX.

[Mass-change filter: graveyard-wontfix-2014-09-24]
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
I can't reproduce this on my current laptop (which has 96 DPI, as reported by xdpyinfo; so, not surprising). I no longer have the machine that I reported this on.  Anyway, given that no one else seems to have been bitten by this & I'm not entirely sure whether it's even still a problem, I'm happy to have it closed.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: