Use actual layout.css.dpi value rather than a multiple of 96

UNCONFIRMED
Unassigned

Status

()

UNCONFIRMED
9 years ago
5 months ago

People

(Reporter: kyleki, Unassigned)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.2) Gecko/20090803 Fedora/3.5.2-2.fc11 Firefox/3.5.2
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.2) Gecko/20090803 Fedora/3.5.2-2.fc11 Firefox/3.5.2

On my HP EliteBook 8530w laptop with a native resolution of 1920x1200 at 147x145 dpi, firefox renders many fonts and images on sites WAY too small.  The firefox interface itself, including menus and preference dialogs all look fine.

After doing a bunch of research I found a "fix" that was done in bug 394103 to force any layout.css.dpi value under 192 to actually render at 96 dpi.  This "fix" is killing my mozilla experience on this laptop.

Please take out this "rounding" and use the actual value set for layout.css.dpi allowing those of us with high resolution laptops to actually surf the web.

Reproducible: Always

Steps to Reproduce:
1. Get a laptop with a native resolution of 1920x1200
2. Launch Firefox
Actual Results:  
Fonts and images are too small (rendered at 96 dpi)

Expected Results:  
Fonts and images should be comfortably viewable at the native resolution of my monitor.

OS:  Fedora 11 (all updates applied)

uname -a:
Linux mylaptop 2.6.29.6-217.2.8.fc11.x86_64 #1 SMP Sat Aug 15 01:06:26 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

xdpyinfo | egrep "dimens|resol":
  dimensions:    1920x1200 pixels (332x210 millimeters)
  resolution:    147x145 dots per inch

layout.css.dpi:  -1

Graphics:
kmod-nvidia-185.18.31-1.fc11.x86_64
(Reporter)

Comment 1

9 years ago
Created attachment 396511 [details]
Snapshot of the firefox dpi issue
(Reporter)

Updated

9 years ago
Version: unspecified → 3.5 Branch

Comment 2

9 years ago
There's a discussion going on about DPI handling here:
http://groups.google.com/group/mozilla.dev.platform/browse_frm/thread/7d6822e96dc10705#

And that references Bug 426788.
We *do* use the actual dpi value for determining the DPI that we use (for interpreting CSS 'pt', 'in', 'cm', etc., units.

What we use a multiple of 96 for is determining the number of CSS pixels per device pixel.
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: 3.5 Branch → Trunk
I'd say we directly use system dpi value for xul rendering, w/o rounding it to 96 multiples, but we round it for content rendering. This is IMHO actually a semi-dup of bug 426788, we just confuse users by different behavior for content and xul.

Comment 5

9 years ago
Okay, so the issue is somewhat complicated.  (Thanks for linking the dev discussion, Brian.)  I hope it gets fixed soon.  My stepfather can't read his web browser (Firefox on Ubuntu) because the fonts are too small for his old eyes.  Every other application is fine, respecting the system dpi setting.  Firefox is the only one that makes him choose between too small to read and too large to tolerate.

Related Ubuntu bug report:
https://bugs.launchpad.net/firefox/+bug/301158

Comment 6

9 years ago
With Firefox 3.6 and later, you can now use the layout.css.devPixelsPerPx preference to control the number of device pixels per css pixels (with a non-integer ratio).
To simplify, if you set the preference to "1.5" everything will be 50% larger. That includes images too, which will look blurry as a side effect.

If you want something that works on 3.5 and only makes the text larger (without images), an alternative is to set a global text zoom content preference. You can do this by installing the Content Preferences extension (https://addons.mozilla.org/en-US/firefox/addon/4066), opening View > Sidebar > Content Preferences and changing the zoom value in the "Global" tab. Then you can check the "View > Zoom > Zoom Text Only" checkbox to zoom only text.

But this isn't related to this bug, so please do not discuss this here in order to keep the comments focused on this bug.
(Reporter)

Comment 7

9 years ago
My laptop has a native resolution of 147x145 dpi (not a multiple of 96).  The layout.css.devPixelsPerPx available in Firefox 3.6 simply gives me the "yucky" zoom effect.  It's providing the same functionality as the "NoSquint" addon which looks UGLY!

If I set layout.css.dpi to 192, everything is much larger (too big in fact) but at least it doesn't look zoomed.  I just want the same effect at the native resolution of my laptop.  This seems pretty basic to me, but I must be missing something since it hasn't been fixed yet.

Comment 8

8 years ago
It's not usual that setting DPI to a multiple of 12 can produce more pleasing results than prime numbers or multiples of 5. On your display Kyle, 144, a multiple of 12 and exactly 1.5 times 96, might work better than 147 or 145.

Comment 9

8 years ago
(In reply to comment #8)
> It's not usual that setting DPI to a multiple of 12 can produce more pleasing
> results than prime numbers or multiples of 5. On your display Kyle, 144, a
> multiple of 12 and exactly 1.5 times 96, might work better than 147 or 145.

s/It's not usual/It's not unusual/
You need to log in before you can comment on or make changes to this bug.