Hacker News new | past | comments | ask | show | jobs | submit login

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: