A certain website that I sometimes frequent for Oracle information uses a lot of Courier New.

This looks horrible in Safari. Is there a way I can always force Safari to substitute Andale Mono or Monaco when a page calls for Courier New?

The HTML in the offending page is not using CSS. The code looks like this:

<font face="Courier New" size="1">
  • if you don't care about Courier on your system why not Duplicate Andale Mono or Monaco (I prefer monaco) and rename it Courier New – dstarh Aug 9 '12 at 17:13
  • If that doesn't work for you, consider trying to install GreaseKit (greasemonkey for webkit) which would run for these domains, allowing you to write a script that could look for the font face and switch it – dstarh Aug 9 '12 at 21:39

The easiest method would be to handle this with CSS and a browser extension.
Install the User CSS extension on Safari 6 available here: http://code.grid.in.th

Running the extension, create and enable a New User CSS. Name it whatever you want. Under URLs, delete the single asterisk and include the domain for the site you frequent (http://*.oracleinfoworld.com/* or whatever. Place asterisks for wildcards). Now under styles, enter the following:

@font-face {
font-family: 'Courier New';
src: local('Monaco');   

Click save, and reload the Oracle information site.

This creates a CSS font-face rule for Courier New, replacing it with your local Monaco font. When the site calls for Courier New, your browser will pass in Monaco (or Andale Mono if you change the name). If you really hate Courier New, you can leave the single asterisk in the include section and replace all instances of Courier New with your preferred font. I would not recommend this, as it may have unexpected effects from time to time.

Here's an example of how I would configure this extension. Example of the extension properly configured.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .