I just started using Firefox 62.0.3 on Ubuntu 18.04. I'm finding the font rendering on some sites (Twitter, Gmail) to be quite different from other apps, and it's a bit of a strain on my eyes. To my untrained eye it looks like Firefox is applying a lot more hinting than other programs. I also couldn't say whether the other programs are "doing it wrong" or Firefox is the odd one out — at the moment I'm comparing to Google Chrome, but maybe that's got some built-in rendering mechanism that's bypassing Ubuntu's "official" rendering. However, looking at sample text in Font Manager, I don't think that's the case.
I've attached some cut-and-pasted screenshots, Firefox on the left, Chrome on the right. Note the extra hinting on the capital 'I' and on the dot on lower case 'i'. Other letters (eg. 'h', 'f') show some of it too. The hinting also seems to affect the kerning, resulting in slightly odd letter spacing. I see this in Gmail too. I don't see it on every site.
Note that I deliberately don't have the Microsoft fonts installed, but I have fallbacks defined in
~/.config/fontconfig/conf.d/00-aliases.conf. In particular,
sans-serif resolves to Roboto, so I think that's what is used for Twitter. Funnily enough, the font used by Gmail is also Roboto. Installing the MS fonts won't answer the question though: why is Firefox different, and how can I make it consistent with other programs?
I'm not using Infinality or anything like that. The above fallbacks are the only customisations I've made. In Gnome Tweak Tool, I have hinting set to "medium" and antialiasing is "standard (greyscale)".
This is a clean install of Firefox, no prior usage, so refreshing didn't actually do much of anything. I have tried the tips in this answer with no effect. Also note I originally posted this on Mozilla's forums.