13

This is probably a duplicate. I can't imagine I'm the first person to notice this.

It seems that Safari 6 has removed the appearance tab from the preferences, and with it, the ability to change the default fonts.

How do I change the default fonts for Safari 6?

asmeurer
  • 1,995

5 Answers5

8

You can still use defaults:

defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2StandardFontFamily Georgia
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DefaultFontSize 16
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2FixedFontFamily Menlo
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DefaultFixedFontSize 14

Another option is to set a CSS file like this as as the default style sheet in the advanced preferences:

body {
  font: 16px Georgia;
}
pre, code, tt {
  font: 14px Menlo;
}

Both options have precedence over the default stylesheet but not over styles specified by websites. So like the preferences in Safari 5 and earlier, they mostly apply to pages that would normally use 15px Times or 13px Courier.

Lri
  • 105,117
  • This doesn't seem to work. – asmeurer Aug 13 '12 at 21:19
  • If you add !important before the semi-colon, it will work. However, that will force all websites to use your specifications. Will screw up sites that use special fonts to display special glyphs (e.g. github.com). – imanuelcostigan Jun 15 '13 at 00:30
  • Well, just changing the bodyfont doesn't work well. I'd suggest applying the font modification to body, p, span, a at least. – Pierre-Adrien Jun 25 '13 at 08:36
5

Serenity Caldwell wrote an article on Macworld when Mountain Lion was first released as a dev preview:

Safari no longer offers an option to set default fonts and sizes (though you can upload a style sheet or force the browser not to show font sizes smaller than a certain number)

You can do this via an extension called User CSS. Pretty simple, add your custom CSS and it will override the styles.

There is also an Apple discussion thread about this, but nothing important has come of it so far. One thing that was mentioned was using HelveticaTheWorld, which changes all the fonts to Helvetica. Not terribly useful unless you want Helvetica everywhere... Another extension mentioned is Google Fonts in Safari. It allows you to pick from the Google Fonts library.

As of right now, there is no other way to change the fonts in Safari. I would suggest you submit Apple feedback to see if you can get this added back in.

daviesgeek
  • 38,901
  • 52
  • 159
  • 203
1
* {font-family: "Helvetica" !important;}
pre, code, tt {font-family: "Menlo" !important;}

I think that is what you want. Work checked in High Sierra.

Also, able set defaults fonts for WebKit2:

defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2StandardFontFamily "Helvetica"
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2FixedFontFamily "Menlo"
Allan
  • 101,432
nesoneg
  • 11
1

Indeed, this is trivially easy with a simple style sheet that overrides the default "body" font. All you need is all of three lines long:

body {
    font: 12px "Lucida Grande";
}
grg
  • 201,078
  • 3
    And where do you put said style sheet? How do you get Safari to always load it? – Daniel Jul 30 '12 at 18:43
  • What do I use to change the monospace font? – asmeurer Jul 30 '12 at 21:32
  • Copy that line of CSS; use a text editor to put it in an otherwise empty text file, and save that text file to your local hard drive with a filename like, say, default.css.

    Then go to Safari > Preferences, select the Advanced tab, and in the Style sheet dropdown, select Other. Navigate to your default.css file, and Safari will start using your new CSS as its default.

    – Jed Hartman Jul 31 '12 at 06:26
-1

Just get Tinker Tool for free. It will let you change the fonts and font size for Safari in OS X Mavericks.

M K
  • 11,047