views:

240

answers:

2

I have Helvetica installed on my Windows XP PC, which is great for designing, but Helvetica looks horrendous when displayed in a browser on PC.

EG If I visit a website with this style:

font-family: Helvetica, Arial, sans-serif;

...Helvetica is displayed, as it is installed on my system.

Can I force Firefox to pretend Helvetica isn't installed on my system? I want these pages to display in Arial.

+1  A: 

I think User CSS/User Styles can help in that you can force the browser to override the pages style.

Some tutorials to help

Matthew Lock
+4  A: 

The other day I came across a site that used Comic Sans, and I decided I wanted to replace it with Verdana. I did some googling and found this Greasemonkey script which removes Comic Sans from any website you visit. I rewrote that script to replace Helvetica with Arial

var tags = document.getElementsByTagName('*');
for (var i in tags) {
 var style = getComputedStyle(tags[i], '');
 if (style.fontFamily.match(/helvetica/i)) {
  var fonts = style.fontFamily.split(',');
  for (var j in fonts) {
   if (fonts[j].match(/helvetica/i)) {
    fonts[j] = 'arial';
   }
  }
  tags[i].style.fontFamily = fonts.join(',');
 }
}
Rob
This ALMOST works, I checked a Helvetica'd page in Firebug and for some reason the script is adding " Light" to the end of the font. So I ended up with: font-family:"Arial ! important Light",Helvetica,Arial,sans-serif;Same thing happened when I removed the "! important" and tried a few other fonts. Any idea where this mystery " Light" is coming from?
Ben
I edited my post. The new code should work. The website you were looking at probably had `Helvetica Light` as the first font.
Rob
perfect!! thanks Rob!
Ben