Firefox4 ignores system DPI and the DPI settings in layout.css.dpi.
The following patch can be dropped into www/firefox/files/ as is. I have submitted to bugzilla.mozilla.org (https://bugzilla.mozilla.org/show_bug.cgi?id=603880). However I doubt it will be accepted anytime soon (the original bug reports is months old and does not even have confirmed status).
This is why I want to suggest adding the patches to the FreeBSD ports tree, the following explanation is taken from my submission to mozilla.
- The PR_MAX macro is used in an unsafe fashion, with function calls as
parameters. Every function in the call is thus called twice, leading
to several variables being set to 0 (at least when compiled under
- Only forward variables to the PR_MAX macro
- The GetPixelLength() function is hard-coded to 96 DPI
- Change signature of GetPixelLength() to take an nsPresContext argument
- Use AppUnitsPerPhysicalInch() / AppUnitsPerDevPixel() from the
context to determine the real DPI as determined by thebes
- Update all calls of GetPixelLength() to the new signature
Patch attached with submission follows:
Change your system DPI settings or play with the layout.css.dpi setting. You will notice, none of these things have an effect.
Over to maintainer (via the GNATS Auto Assign Tool)
Thanks for your patch. This patch should go upstream as we try to avoid
adding local patches for non-critical bugs.