On a few of my computers with 4K monitors running Linux, Firefox either display with tiny fonts or very large fonts, while most applications behave normally.
After searching for a work around, I found the following solution works for me: setting the layout.css.devPixelsPerPx
to a smaller number, e.g. 0.7.
From this this page:
You can set layout.css.devPixelsPerPx to 1.0 (default is -1) on the about:config page. Adjust its value in 0.1 or 0.05 steps (1.1 to enlarge or 0.9 to reduce) until icons or text looks right. You may need values above 2.0 if you have a high resolution display but make sure not to use values too large or too small.
To modify layout.css.devPixelsPerPx
, type about:config
in the address bar, and click on Accept the Risk and Continue button. Then in the “Search preference name” seach box, type: layout.css.devPixelsPerPx
, and click on the pencil icon to adjust its value as desired.
Reference: