Comment 6 for bug 301158

Revision history for this message
Chris Conway (cconway) wrote : Re: Firefox layout.css.dpi ignored in Kubuntu

Some more info on what I've found on my system...

The problem seems to be with fonts that have px units for font-size (let's call them "px fonts") vs. fonts with pt as font-size unit ("pt fonts"). Pt fonts match GNOME fonts of equal point sizes exactly with layout.css.dpi=0 and vary directly in proportion to layout.css.dpi for values >0. Px fonts are unreasonably small with layout.css.dpi=0 and are not affected by any value of layout.css.dpi from 0 through 191. At layout.css.dpi=192, px fonts suddenly double in size. They are unaffected by layout.css.dpi from 192 to 257. At layout.css.dpi=258, they grow another 50%.

It seems px fonts only vary at multiples of 96dpi, with a minimum of 96dpi. At the multiples of 96dpi, we have the traditional correspondence between px and pt: 96px=72pt. In between the multiples, the ratio gets lopsided, e.g., at layout.css.dpi=191, we have 96px~=36pt.

It seems to me the correct behavior would be for px fonts to vary directly with layout.css.dpi, maintaining approximately 96px=72pt for any DPI setting.