Browser.display.screen resolution
Contents
Background
CSS can use a variety of units for specifying dimensions. These units are classified as either absolute or relative. Absolute units (inches, centimeters, millimeters, points, and picas) are intended for use when the final output medium is of known dimensions; for example, in a print stylesheet. When they are used onscreen, their actual values must be calculated based on the DPI of the screen.
This preference determines what DPI should be used for calculating the dimensions of elements set using absolute width units. It replaced browser.screen_resolution in Gecko 1.7.x (the rendering engine for Firefox 1.0.x) and is replaced by layout.css.dpi in Gecko 1.8.1 and 1.9 (i.e., the rendering engines for Firefox 2.0 and 3.0).
Possible values and their effects
-1
Use the host system’s logical resolution or 96, whichever is greater, for interpreting dimensions specified in absolute units. (Default)
0
Use the host system’s logical resolution for interpreting dimensions specified in absolute units. This is the value when the 'Display resolution' is set to 'System setting.'
(any positive integer)
Use this number for interpreting dimensions specified in absolute units.
Caveats
- This preference is not meant as a general “zoom” feature to scale all rendered web content.
- This preference has no effect in Windows (the OS’s DPI setting is queried directly).
- In Mozilla Firefox 1.5, the preference’s default (96) overrides the system setting (bug 323962)
UI
Mozilla Suite
“Edit → Preferences → Appearance → Fonts → Display resolution”
Mozilla Firefox 1.5
“Edit → Preferences → Content → Fonts & Colors / Advanced → Display Resolution” (non-Windows only)
First checked in
Has an effect in
- Netscape (all non-Windows versions since 6.0)
- Mozilla Suite (all non-Windows versions since M16)
- Mozilla Firefox (all non-Windows versions of 1.5.0.x)
- Mozilla Thunderbird (all non-Windows versions of 1.5.0.x)
- SeaMonkey (all non-Windows versions of 1.0.x)
Related bugs
- Bug 31136 - Rename prefs from "browser.xxx" to "browser.display.xxx"
- Bug 69205 - pref browser.display.screen_resolution does nothing
- Bug 197037 - [Xft] Fonts get smaller when preference dpi value is increased
- Bug 233082 - default value of browser.display.screen_resolution is wrong
- Bug 308075 - Wrong browser.display.screen_resolution default causes inconsistent GUI appearance
- Bug 323962 - Firefox should not override browser.display.screen_resolution
- Bug 323964 - DPI preference has different meaning on OS/2 than other platforms
- Bug 327406 - rename browser.display.screen_resolution pref (DPI pref)