I've recently switched back to Firefox as my primary web browser, but on my workstation running Fedora 32, I found that the font rendering was kind of gross and was very unpleasant to look at. Luckily, Reddit user sweetcollector pointed out not only the problem (that Firefox doesn't use the font configuration provided by the desktop environment), but the solution:
Create /etc/fonts/local.conf
and place in it the following contents:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign">
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintslight</const>
</edit>
<edit name="lcdfilter" mode="assign">
<const>lcddefault</const>
</edit>
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
</match>
</fontconfig>
After restarting Firefox, it should start using the fonts your DE recommends and better fit into your OS theme.
Comments