Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Find corrupt fonts using Spotlight in Terminal UNIX
In doing an mdimport -A in Terminal, I noticed a particular attribute called com_apple_ats_font_invalid. Spotlight seems to set this attribute for files in a font folder (e.g. ~/Library/Fonts) that aren't valid font files. Try this is a Terminal window to see if you have any bad fonts:
$ mdfind "com_apple_ats_font_invalid == 1"
You can see this in action if you use the -live switch on the above command. Once the mdfind starts, in another Terminal window, create a bad font:
$ echo "bad font" > ~/Library/Fonts/badfont.ttf
You'll see that the query in the first window now shows one match; remove the file you just created (rm ~/Library/Fonts/badfont.ttf), and the query count will drop to zero. Press Control-C to end the mdfind in the other window.

I'm not sure if this is new for Leopard or whether Tiger has it as well.
    •    
  • Currently 2.75 / 5
  You rated: 5 / 5 (8 votes cast)
 
[11,342 views]  

Find corrupt fonts using Spotlight in Terminal | 5 comments | Create New Account
Click here to return to the 'Find corrupt fonts using Spotlight in Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Find corrupt fonts using Spotlight in Terminal
Authored by: cokery on Jul 25, '08 08:16:09AM

Although this hint works I am not sure the information Spotlight is giving is correct. It found half a dozen invalid fonts which I then checked in Fontbook, which reported them all as being valid. I am included to believe Fontbook rather than Spotlight in this.



[ Reply to This | # ]
Find corrupt fonts using Spotlight in Terminal
Authored by: richwiss on Jul 25, '08 10:01:10AM

What do you do with the corrupt ones? Just drag them to the Trash?



[ Reply to This | # ]
Find corrupt fonts using Spotlight in Terminal
Authored by: bobme on Jul 27, '08 01:27:34PM

Fonts are not "corrupt." They are "corrupted." Unless you are accusing the fonts of breaking the law ....



[ Reply to This | # ]
Find corrupt fonts using Spotlight in Terminal
Authored by: clh on Jul 27, '08 04:45:15PM
Not according to http://wordnet.princeton.edu/perl/webwn?s=corrupt (see #3)

Adjective

* S: (adj) corrupt (lacking in integrity) "humanity they knew to be corrupt...from the day of Adam's creation"; "a corrupt and incompetent city government"
* S: (adj) crooked, corrupt (not straight; dishonest or immoral or evasive)
* S: (adj) corrupt, corrupted (containing errors or alterations) "a corrupt text"; "spoke a corrupted version of the language"
* S: (adj) corrupt, tainted (touched by rot or decay) "tainted bacon"; "`corrupt' is archaic"


[ Reply to This | # ]
Find corrupt fonts using Spotlight in Terminal
Authored by: blackxacto on Jul 29, '08 05:56:42AM

-bash: $: command not found

Tried the command in Tiger and got the above. jr

---
You'll never know which way to look, which way to see us.



[ Reply to This | # ]