How to scale Firefox to work better on high DPI screens

About:config in Firefox
About:config in Firefox

Sometimes, your OS will scale every app so things look right, but if you have a screen that is quite small and has quite many pixels, but not extremely many, it might work better to have the OS work at 100% and just scale the few programs that need it. This is what I do on my 15 inch laptop, as most programs look good at 100% on the 1920 x 1080 pixels screen. I have just found that LibreOffice and Firefox needs a little bit of scaling to avoid the content getting too small.

Open Firefox advanced preferences page (about:config) and set parameter layout.css.devPixelsPerPx to 2 (or find the one that suits you better; 2 is a good choice for Retina screens).

After some trial and error, I have found 1.1 to work well on my 15 inch 1920 x 1080 display. With a factor of 1, ie 100%, content on my screen is a bit small, but with a factor of 1.1, I find webpages very readable.