You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Safari fonts messed up

A while ago I changed something about Safari that caused displayed fonts to get all messed up. Now I want to reset it to defaults. The problem exists in only one user account.


For example, this is a part of an eBay account page:



See how the fonts are all too big? Sometimes they even run together. Besides being ugly it makes pages impossible to read.


This is how it's supposed to look, using the same Mac, same Safari version, same eBay account, just a different user:



I used eBay for an example because it's obvious but the problem exists in most websites including this one (Apple Support Communities).


This is what I did:


  • Checked for Safari Extensions. None installed.
  • Checked for CSS sheets. None Selected.
  • Page Zoom: 100%, same for everything.
  • Tried the big A / little A in Safari's Toolbar. Yes it makes fonts bigger and smaller but the big ones are ok while the little ones become miniscule and unreadable so that's not right.
  • Indiscriminately trashed all sorts of Safari .plist files but I'm not sure I got them all. Probably didn't.
  • Safari Plug-Ins: None installed.
  • Deleted all website data (Manage Website Data: Remove All)
  • Safari Preferences > Advanced: nothing is selected except Internet plugins "stop plug-ins to save power" which I think is its default
  • Default Encoding: Western (ISO Latin 1) which I think is its default also
  • Proxies: None (doubt that is related to anything anyway)
  • Font Book: Restore Standard Fonts (no conflicts found anyway)


Pages render ok in Firefox so that's not it. Firefox looks like the bottom screenshot. What am I missing?


I posted this elsewhere: Safari font rendering is all wrong but I got no replies there 😟 hoping this Discussions area is more popular. Yes I'm stuck with El Capitan on this Mac. It's old.

iMac Line (2012 and Later)

Posted on Nov 12, 2020 4:52 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 4, 2020 6:02 AM

DIdn't occur to me the .plist file would have anything to do with this issue! That's some excellent sleuthing on your part. Funny, in a way, how old commands the app should be ignoring/removing can cause so many problems.


Entirely up to you as the author of the topic to decide when to mark it solved. Since your post is the actual solution, it should be marked. As the author, you don't get any points for marking any of your own posts, but the idea of a Solved post is to have the solution appear at the top for others who find this topic while looking for a similar issue.

7 replies
Question marked as Top-ranking reply

Dec 4, 2020 6:02 AM in response to JudgeMentalOversteer

DIdn't occur to me the .plist file would have anything to do with this issue! That's some excellent sleuthing on your part. Funny, in a way, how old commands the app should be ignoring/removing can cause so many problems.


Entirely up to you as the author of the topic to decide when to mark it solved. Since your post is the actual solution, it should be marked. As the author, you don't get any points for marking any of your own posts, but the idea of a Solved post is to have the solution appear at the top for others who find this topic while looking for a similar issue.

Dec 3, 2020 3:56 PM in response to Kurt Lang

Success!


You were definitely on the right track with fonts, but the fonts affected were affected only in Safari and nowhere else. That's why I went and deleted some Safari .plist files but I didn't get them all:


  • Indiscriminately trashed all sorts of Safari .plist files but I'm not sure I got them all. Probably didn't.


No, I didn't. Or perhaps I did but didn't quit Safari or log out so it might have kept re-reading a Safari cache file, but anyway the guilty party was none other than ~/Library/Preferences/com.apple.Safari.plist.


Trashing that file fixed the problem but of course everything else was reset to defaults including history, bookmarks, basically everything.


But wait! It gets better!


Because I did not want to forego all my many Safari settings I poked about in com.apple.Safari.plist and looked for anything and everything font-related. At first I got discouraged because my plist file had grown so large, over 400k in size whereas a default empty .plist is only about 3k. Remember this Mac began life with Snow Leopard or maybe even Leopard. There were hundreds of lines to investigate and lots of trial and error but in the end I identified these two specific keys:


	<key>com.apple.Safari.ContentPageGroupIdentifier.WebKit2DefaultFixedFontSize</key>
	<integer>18</integer>
	<key>com.apple.Safari.ContentPageGroupIdentifier.WebKit2DefaultFontSize</key>
	<integer>24</integer>


Those keys do not exist in a default .plist, and there was nothing I could do with Safari's Preferences that would affect them. Contrast that with the fact I could arbitrarily delete some other keys and launching Safari again would re-build them. Yet there was a lot of stuff in there including Extensions of all things that have been long dead, and apparently if Safari doesn't know what to do with them it leaves them alone.


So: taking out those two lines AND ONLY those two was enough to fix the funky fonts!


Much appreciated Kurt! Now please reply so I can mark it solved?

Dec 1, 2020 6:06 PM in response to Kurt Lang

Thank you Kurt, I really appreciate your reply and I apologize for not responding earlier.


I had tried all those things already and you are correct about Command + / - as well as using page zoom. None of it makes any meaningful difference though. If Page Zoom in "settings for this website" is set to 100% I get the messed up eBay screenshot I posted earlier.


Noteworthy is the fact that if I get the fonts to render reasonably correct (smaller), then the frames enclosing them become not correct. They also become too small, so while the text is smaller the frames scrunch the smaller text and I just get a smaller version of the screenshot I posted earlier.


I'm at a loss 😟


I suppose I could nuke this entire User Library. Maybe I'll do that. Much appreciate your help.


Edit: Quit Safari and dragged the entire ~/Library/Safari folder to the Trash. Didn't fix it 😟 Gotta be something else in ~/Library/ causing the messed- uppedness.

Dec 2, 2020 5:10 PM in response to JudgeMentalOversteer

To start with a small correction to my previous post. Command+0 (a zero, not capital o) sets the screen back to 100% of size. Command+1 through Command+9 are used to move to between tabs in numerical sequence from left to right.


If you create a test user account and login to that, does it do the same thing there? If not (and likely not), then it confirms the problem is confined to your normal account.


You could try clearing out all font cache data.


Close all running applications. From an administrator account, open the Terminal app and enter the following command (or copy/paste it from here):

 

sudo atsutil databases -remove

 

Enter your administrator password when prompted.

 

This removes all font cache files maintained by macOS. Both for the system and the active user account. After running the command, close Terminal and immediately restart your Mac.

Dec 3, 2020 9:37 AM in response to Kurt Lang

That's OK, I knew what you meant regarding screen zoom. I believe I exhausted all those possibilities.


The problem does not manifest in a different user account, so you are absolutely correct. It's just this one account that is the problem, which is good as far as I am concerned because I know I can fix it. It only affects Safari too, so it should be even easier to fix. Only Safari and only one account, but most web pages, so not just eBay and Apple. Most websites are affected but some are more obvious than others.


Thanks for the suggestions regarding font data. One of the things I not mention was Safe Mode in addition to restoring standard fonts in Font Book but they did not change anything. Safe Mode was supposed to clear out some system font caches (?) but I tried your suggestion too:


Removing: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000c4000031/C/System
Removing: /private/var/folders/f4/drzhn4x5483bhsrzhw2vpyy00000gn/C/com.apple.FontRegistry


No changes 😟


Still I think you're on to something though. The clue is definitely font-related but it's definitely confined to Safari. Firefox displays those pages OK. I'm going to try focusing on Safari settings in particular. It's stuck on something. But what?


It's not so important that I could not simply nuke the entire User Library but I would like to learn exactly what has been causing the problem all these years.


I really appreciate your interest and thanks for your help!

Dec 3, 2020 3:10 PM in response to JudgeMentalOversteer

Safe Mode clears out the cache data of the user account you log into. But I don't know if that includes the user account font cache data. I know it doesn't include the system font cache. Hence the need to run the command separately to get both.


Restore Standard Fonts kicks all third party fonts you may have installed to another folder, next to each Fonts folder. All that's left active then are the fonts installed by the OS.

Safari fonts messed up

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.