Firefox does not handle high DPI screens. It renders fonts at a fixed 96dpi and your only option is to crank up the devPixelsPerPx pref, which is akin to page zoom.
The bug has been reported multiple times. It always ends up being closed as wontfix, which is just burying the head in the sand. My laptop is 210dpi, and I guess we'll just go up from here.
> your only option is to crank up the devPixelsPerPx pref, which is akin to page zoom
Since Firefox 22 you shouldn't need to adjust it manually. See eg this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=844604 (Status: RESOLVED FIXED). I'm not sure why you seem to think that "akin page zoom" is not the proper result, what else you expected?
Quoting Anandtech:
> Chrome is scaled 150% as Windows asked, but it is hazy and blurry. Disabling DPI scaling for the application and then scaling to 150% inside Chrome produces crisp, clear text. Firefox also didn’t scale automatically, but it has a setting to adjust to make it follow the Windows DPI scaling rules. Once set, Firefox looks very nice and crisp. For most people, that setting should already be set to follow DPI scaling.
Notice that the i3 bar at the top has the font at the correct scale. The page itself too (via devPixelsPerPx). Chrome elements such as tab names or the URL bar are at less than half the correct size and barely usable without a hack plugin (I use Theme Font and Size Changer).
Everything other than FF or Thunderbird scales correctly. The X server is set to 210dpi and GTK reports the correct density too. It is firefox that is misbehaving.
This is FF nightly (34, I believe), so way way after FF 22. It is not fixed, and it is not a loved bug. Time will make the bug bite the developers and by then it will be fixed, I'm sure.
Oh, Linux. Yeah, the story there might be significantly worse, possibly even more if you are not running GNOME. I'll have to test that myself, but I can imagine that it is not as smooth as Win/OSX. I'll just say that it is not representative of Firefox as a whole.
From what I gather about in several submissions of the bug in the past, the problem is that properly setting display density in Linux has changed over time. So, it is inconsistent and is thus in many instances false. Firefox then concludes that X lies about display density and ignores it.
It is a wrong assumption, and one that pegs FF to 96dpi on Linux. It is not a sustainable decision, but I guess it will only be reverted when the noise about it is enough, which will only happen when high dpi displays become more common.
Anyhow, it is not correct to assume X lies about the display density. Modern distros set the density correctly, ever since the infrastructure for xrandr was put into place. Its only fault, today, is that display density can't be set per display. It is a setting of the root window, I believe, so it is shared by all displays.
Side note: This is i3 running on top of a gnome3 session. For the sake of this problem, it can be seen as a gnome session.
> the problem is that properly setting display density in Linux has changed over time
Yeah, I just tested this on my GNOME3 system, and there is no simple DPI setting anywhere in sight. `xrandr --dpi 144` which seemed like the logical solution had absolutely zero effect on anything (gnome or firefox). Anyways this is what I ended up with: GNOME scale factor at 1.5 and layout.css.devPixelsPerPx also 1.5: http://zokier.net/stuff/firefox_linux_150.png . Looks pretty good to me.
edit: and just for completeness sake, I also tested this on KDE4. Before changing session I reverted GNOME scale factor to 1.0, so it did not affect my results. I again started with `xrandr --dpi 144` and launched Firefox and the fonts actually had been rescaled! UI was not, but that was fixed with layout.css.devPixelsPerPx=1.5, end result: http://zokier.net/stuff/firefox_kde_150.png
In conclusion, it seems like Firefox on Linux queries the DE for fonts (size and family). KDE4 seems to use X DPI settings in determining the font sizes, while GNOME3 is ignoring them and instead using its own "scaling factor".
edit2: this is getting bit out of hand. I also tested this with just a WM (in this case Fluxbox), without DE. `xrandr --dpi 144` had no effect but setting Xft.dpi to 144 with xrdb did adjust the font size in Firefox. Like others, devPixelsPerPx needed also to be set to 1.5 for UI to scale: http://zokier.net/stuff/firefox_fluxbox_150.png
So in further conclusion I'd say Firefox is handling the situation relatively well, considering the mess that DPI scaling seems to be on Linux.
devPixelsPerPx is much, much better than "page zoom." For example, it displays 2x content correctly. In fact, Firefox is the only browser that supports high-DPI displays on Linux. Chrome doesn't bother.
It is good. Not perfect, but usable. Anyhow, web development has a problem with high screen displays. On the one hand, the px unit in CSS is not a real pixel, so it can be scaled with respect to screen pixel density without breaking the spec. On the other hand, images are really measured in screen pixels.
The end result is that layouts break at densities other than 96dpi, where one CSS px is one screen pixel. The solution would be for image files to embed the display density, but from what I gather, browsers discard that information.
As I posted in the other comment, the major problem now is that the browser UI is not drawn at the correct density and ends thus tiny on high dpi displays.
Anyhow, as these displays become pervasive, it must get fixed.
The bug has been reported multiple times. It always ends up being closed as wontfix, which is just burying the head in the sand. My laptop is 210dpi, and I guess we'll just go up from here.
One instance of the bug:https://bugzilla.mozilla.org/show_bug.cgi?id=512522