[scroll down for the code]
This isn't the end all - be all solution, but it fixed the following problems for me, and fonts displaying correctly* is cruzial if you're doing any webdesign. I found this thread but since it's closed I thought I'd share this fix for ya'll.
*) By correctly I should maybe say "show it as it would for Windows", since we're trying to correctly show the default serif font as "Times New Roman" and the sans-serif font as Arial.
My senario was this: after using Ubuntu now for 5y I just realized that Firefox doesn't render css rules specifying
as "Times New Roman", regardless of any msttcorefonts package installed or not. It instead gets replaced by ghostscript (gsfonts) to show "Nimbus Roman No9". And (atleast in Firefox), Nimbus doesn't look like Times at all.
font-family: Times, serif;
To get a better picture of what I mean, this is how Firefox now shows Times, "Times New Roman", Arial and Helvetica after I finished fixing some things. Compare this image to the acctual page I setup here: http://jsfiddle.net/2GzvY/3/embedded/result/
Now to the solution, which isn't to remove any packages or hack the font settings globally, but to instruct your browsers what font file to use. That, and making sure you have all the fonts installed. The latter was a shock to me, I always thought Helvetica was installed though the non-free package at system install, but it isn't.
So first, make sure you have the msttcorefonts package installed, and also install fondu. Then, google for "Helvetica.dfont" (about 1MB, Mac Font Package), extract the font files to your font folder ~/.fonts :
Now follow the instructions here (raw file) to add the @font-face rules to Firefox and Chrome(-ium). These will correct any css rules that just says "Times" to, instead of using Nimbus, use "Times New Roman".
$ fondu Helvetica.dfont
Lastly, restart your browser(s) ans check the refernce page again. It should look like this image.
I hope this comes in handy and that someday this will be corrected. Sorry if this was hard to follow, I do my best.