14

I have just updated to Yosemite and something must have changed in the way Preview renders fonts.

I find that Preview display of text in PDF files is rather sloppy, I am pretty sure it used to be much sharper in Mavericks. At the very least now Preview is significantly less sharp than Acrobat Reader, you can check out a screen-shot to convince yourself of what I am talking about.

In the rest of the UI I am quite happy with how fonts are displayed. So I was wondering if there are ways to control the anti-aliasing of Preview. In the preferences of Preview I can find only a global switch for anti-aliasing, but I would like to play around with the strength of the anti-aliasing so to find the optimal setting.

I am looking into defaults of com.apple.Preview but in my current values there seem to be no setting about Font Smoothing or anything evocative of anti-aliasing. Any suggestion about possible values to edit here?

Thanks for your suggestions, Roberto

enter image description here

  • Same question has been raised here and reported to Apple here and here. Not sure if Apple ever replies on its own forum though. – Leo Fang Oct 23 '14 at 14:14
  • @DanielLawson, this is clearly a new bug introduced in 10.10. Why took the bug tag away? – Leo Fang Oct 23 '14 at 15:17
  • Tags are for filtering. There are people who are interested in reading or not reading posts about Yosemite, so the Yosemite tag is helpful. No one is generically interested in bugs, or is an expert in all things bug-related, so it's not a helpful tag on the main site. – Daniel Oct 23 '14 at 16:43
  • @DanielLawson, I totally disagree. This is not the general philosophy across the StackExchange site. Tags are there for purpose. Adding a bug tag helps readers quickly diagnose whether a weird situation they meet is due to some improper manipulations or things they cannot fix and have to wait for a future update. If it's the latter then they could know to push the concerned third party (Apple in this case) to fix it. I insist a bug tag is necessary for this post, otherwise why bother creating this tag? – Leo Fang Oct 23 '14 at 19:18
  • My point is that we shouldn't have a bug tag, and this is one of the steps in the process of making it go away. – Daniel Oct 23 '14 at 21:11
9

I have found a solution to this problem: replacing Yosemite's PDFKit with Mavericks' PDFKit. As simple as that. I replaced the contents of /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/PDFKit.framework/Versions/A and everything is working fine now.

For those who don't have a copy of Mavericks from where you can take the PDFKit files, I have uploaded a copy to: http://www.filedropper.com/pdfkit (hope there are no copyright issues with this - I will remove the link if asked to do so).

By the way, changing the Current symlink to point to the Mavericks version and keeping the original A/ directory DIDN'T fix the issue. I had to remove the Yosemite version completely and put the Mavericks version contents inside A/ (it seems Preview and Skim both are hard coded to Versions/A and do not follow the Current symlink).

  • Thanks Gustavo for this suggestion. I can access a 10.9 OS X to hack this piece of Quartz, but it seems a quite heavy surgery. Is this really the minimal thing to have an impact? – Rho Phi Jan 25 '15 at 21:59
  • I have tried this in a 10.10.2 virtual machine and it works. – Kristian Duske Feb 3 '15 at 16:22
  • 2
    Updating from 10.10.1 to 10.10.2 broke this (=replaced the Mavericks's PDFKit with Yosemite's PDFKit). Repeating the above procedure again worked though. – Gustavo Bezerra Feb 7 '15 at 1:48
  • @gustavo-bezerra could you upload it again? I have the latest yosemite 10.10.4 and still have the same issues. – ndrizza Jul 20 '15 at 17:29
  • Sorry for the late reply. Here you go: dl.dropboxusercontent.com/u/18085964/pdfkit.zip – Gustavo Bezerra Aug 2 '15 at 6:11
4

Apparently in Yosemite, Preview doesn't use LCD font smoothing (subpixel rendering) even if LCD font smoothing is enabled from System Preferences. Skim never uses LCD font smoothing either, but the way text is rendered depends on the AppleFontSmoothing setting or whether LCD font smoothing is enabled from System Preferences.

Commands like defaults write -app Preview AppleFontSmoothing -int 2 don't have any effect. I didn't find any preference keys by running strings /Applications/Preview.app/Contents/MacOS/Preview or strings /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/PDFKit.framework/PDFKit either.

Skim's developer closed a bug about the issue as "can't fix".

  • I have tried AppleFontSmoothing as well, but seems not to have a major impact (for what I can see). May I ask you how did you figure out that both Skim and Preview do not use "subpixel rendering" in 10.10? Is subpixel rendering the same as anti-aliasing? and are you implying that in 10.9 Preview was instead using subpixel rendering? – Rho Phi Oct 22 '14 at 7:18
  • 1
    I edited the answer. If subpixel rendering is enabled, there's colorful pixels on the fringes of black text, like in the top and bottom screenshots in the image in the answer. Preview and Skim did use subpixel rendering by default on normal LCDs in 10.9. – Lri Oct 23 '14 at 13:01
  • @Lri was right, the subpixel rendering is not enabled in 10.10. See here for magnified comparisons. – Leo Fang Oct 23 '14 at 14:20
  • 1
    BTW, the most peculiar thing I noticed is that while subpixel rendering is not enabled in Preview, it is still enabled in Safari. One can try to compare same PDF viewed in both Safari and Preview. – Leo Fang Oct 23 '14 at 14:42
3

Gustavo's Answer fixes the problem on El Capitan 10.11.4 as well.

Before: enter image description here

After:

enter image description here

2

Finally the Problem has been fixed by Apple. You just have to update to Yosemite 10.10.3!

  • 2
    i have 10.10.4 and my font is still blurred. – ndrizza Jul 20 '15 at 17:29
  • And, bang, it's back again with Sierra 10.12.6! – Bryan Aug 17 '17 at 14:43

You must log in to answer this question.

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