Closed Bug 18781 Opened 25 years ago Closed 25 years ago

[PP] Logical pixel density under Windows not honored

Categories

(SeaMonkey :: General, defect, P3)

x86
Windows 98
defect

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: braden, Assigned: leger)

Details

Attachments

(3 files)

Mozilla does not appear to honor the logical pixel density as can be set by the
user under Windows 98. The attached screen shots (to follow) show a setting of
101 ppi. Note the significant difference in size between the native menubar font
and Mozilla's menubar font.
Isn't the problem here really that Mozilla doesn't support UI fonts at all, and
therefore is using a menubar font that is totally unrelated to that of the OS?
That may be true, but I think this is a different problem. Mozilla's font sizing
under Windows doesn't seem to change with fine-grained changes to the logical
pixel density.
How fine grained are your changes?  Are they big enough to cause an integer
pixel-size change?

Note also (see bug 16200) that I have proposed that Mozilla round the logical
resolution so that the number of twentieths of a point (Mozilla's internal
coordinate system) per pixel is always an integer.  This is *mathematically
necessary* to prevent rounding problems when scrolling is done my moving chunks
around the screen (otherwise the movements of the bitmaps can't be represented
exactly in Mozilla's internal coordinates).  However, this isn't implemented yet
on Windows (it is on Unix, but there's another piece to bug 16200 as well).

(A better solution to that problem would really be to use fractions of a pixel
as the coordinaties.  However, this *could* be a major change - since code
*probably* exists somewhere that assumes the other way around, and it's probably
too late at this point to safely root it all out.)
Braden, today I finally figured out where Mozilla's base UI font size is set:

  /mozilla/dist/WIN32_D.OBJ/bin/chrome/global/skin/default/global.css

If you are using a nightly build or milestone build, the location may be
slightly different, but the last few parts of that path name should be the
same. The base font size is currently set to 3mm, which is 8.5pt, and I find
that to be rather small. Try changing it in your environment.

So this could be one of the reasons for the discrepancy between the native
menubar font size and Mozilla's menubar font size.

If Mozilla is not responding to fine-grained changes in the logical pixel
density, this is probably due to integer rounding. Does Mozilla respond to
coarse-grained changes in the pixel density?
David: The changes are big enough to cause the size (in pixels) of the native
menubar fonts to change, while Mozilla's do not. Note the difference in the
screen shots.

Erik: Where are you drawing the line between "coarse" and "fine"? The only
change I've noted so far is when jumping from 96 to 120 ppi.
Since Mozilla's are smaller overall, you'll need to make a larger change to
cause a 1px change.  It could also occur at a different threshhold.

You might want to try making a test page with font sizes 8.0pt, 8.1pt, 8.2pt,
8.3pt, etc.  (or even better, by 20ths, which are Mozilla's internal
coordinates).  Then change your logical resolution by small amounts, and you
should see some of them change...
You're right, David. Marking invalid.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
QA Contact: leger → cpratt
[QA assigning to cpratt to verify. ;]
Status: RESOLVED → VERIFIED
Marking Verified.
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: