Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

renwrite

macrumors newbie
Original poster
Nov 15, 2010
9
0
Is there any way to automatically find duplicate fonts that have different names. I have 1000's of fonts and it is slow to do it manually.
 
Is there any way to automatically find duplicate fonts that have different names. I have 1000's of fonts and it is slow to do it manually.

cmp file1 file2

You can use it to check if there are any differences between two files.

EDIT: You can write a script to check every file with that command.
 
got some

http://www.araxis.com/find-duplicate...index-eur.html.

I downloaded the program and it did good. Thanks! Of the over 30,000 fonts I had it found 383 that were duplicates. They seem to have similar names.

The terminal idea seems to work if I have individual fonts that I suspect are the same and I run it, but if I am visually checking them, I can make a judgment call.

Is there anything out there that will analyze the fonts to see if they are the same just different names? (for example Margarita Script and Yesterday script are two fonts that are identical, just different names)
 
I wrote a small console application for you that checks every file in a given folder and see if they are byte-by-byte identical or not.

Download (For Mac OS X 10.5 & 10.6): http://www.mediafire.com/?pouh3jvq23ahrao

Screenshot:
screenshot20101115at854.png


If you know C++ and interested in the source, just send me a message.

P.S: About the above screenshot, taken from one my later posts:

It looks like it has found many identical fonts, but if you look carefully they are not font files (they don't have .ttf at the end). So don't go deleting the similarly named .ttf files by mistake :)
 
Last edited:
step by step

Isair Thank you so much. I am anxious to try it. But forgive my ignorance. I will download it. The file it creates I put in the same folder as all the fonts (they are on my desktop in a folder called fonts) and in terminal I type

./duplicatefinder /desktop/fonts


and then hit enter

correct?
 
The argument must be a full path, for example:

./duplicatefinder ~/desktop/fonts

or

./duplicatefinder /users/your-user-name/desktop/fonts

Also there were 2 bugs in the application which I fixed:

1) It now skips entries in a directory if they are directories themselves.
2) Checks duplicates correctly, there was an embarassing coding mistake on my side.

Fixed version: http://www.mediafire.com/?oe8daqqtqq5f4v8
 
terminal

sorry for the delay - took sick dog to vet...


Okay, I must be doing something wrong. I downloaded the new file and put the resulting file in the same folder with the fonts.

this is what I get from terminal...

Last login: Mon Nov 15 11:07:34 on ttys001
[becky-3:~] geoffandbeckyhannert% /Users/geoffandbeckyhannert/Desktop/fonts/DuplicateFinder ; exit;
dyld: unknown required load command 0x80000022
Trace/BPT trap
logout

[Process completed]
 
terminal

I tried a few other variations in terminal and got...


[becky-3:~] geoffandbeckyhannert% ./duplicatefinder ~/desktop/fonts
./duplicatefinder: Command not found.
[becky-3:~] geoffandbeckyhannert% .duplicatefinder ~/fonts
.duplicatefinder: Command not found.
[becky-3:~] geoffandbeckyhannert% ./duplicatefinder ~/desktop/fonts
./duplicatefinder: Command not found.
[becky-3:~] geoffandbeckyhannert% ./DuplicateFinder ~/desktop/fonts
./DuplicateFinder: Command not found.
[becky-3:~] geoffandbeckyhannert%
 
You are trying to execute a program named duplicatefinder in your home directory, which does not exist. For the ease of use, so you don't have to cd to where you placed duplicatefinder each time:

1) Put DuplicateFinder in your home directory.
2) Open Terminal.
3) Then write what you have been writing up to now.

EDIT: By the way are you using 10.6 or earlier? It may not work on 10.5 and earlier systems.
 
Last edited:
terminal

It is really nice of you to try to help me so much!.

I am using 10.5.8

Here's what I got this time


[becky-3:~] geoffandbeckyhannert% ./DuplicateFinder ~/desktop/fonts
dyld: unknown required load command 0x80000022
Trace/BPT trap
 
I fixed mine with Font Book, but it's not free ($10). It works well though. You can use it disable fonts too, if you have a lot that you don't use but want to keep them around just in case.

Good luck. Playing around with terminal is fun at least and a good thing to be comfortable with. :)

(Hope your dog is OK. Stresses me out something awful when mine gets sick.)
 
terminal

Must be getting closer...

Found 38434 entries in /Users/geoffandbeckyhannert/desktop/fonts
Checking for duplicates, please wait...

Segmentation fault



(Dog, not okay, but she is getting some good love today)
 
Sorry for the late answer as I had to go somewhere. But here is a revised version, I changed too many things so I am not gonna write about them but after seeing the error you have I turned my eye on directories containing large amount of files and made my test cases on them.

The version that should also work on your computer: http://www.mediafire.com/?vd3kb5z00gtsg02

EDIT: I also made a version without file path/name length limitations. I doubt that it is your problem as the limit I put was 1024 characters, still also give this one a try: http://www.mediafire.com/?pouh3jvq23ahrao

Also note that in this screenshot of one of my tests:
screenshot20101115at854.png


It looks like it has found many identical fonts, but if you look carefully they are not font files (they don't have .ttf at the end). So don't go deleting the similarly named .ttf files by mistake :)

P.S: Hope your dog gets well soon.

EDIT: Now that I think, I might throw in a GUI and some more functionality and sell this for a dollar or two when Mac App Store comes up :p
 
Last edited:
terminal

It ran for a long time, but I think something went wrong...

becky-3:~] geoffandbeckyhannert% ./DuplicateFinder ~/desktop/fonts

Found 32746 entries in /Users/geoffandbeckyhannert/desktop/fonts
Checking for duplicates, please wait...

Caeldera and CalistoMT are identical!
Caeldera and Calli109 3 are identical!
Caeldera and Calliope are identical!
Caeldera and CasloFivForIta are identical!
Caeldera and CasloFivForItaOsF are identical!
Caeldera and CasloFivForRom are identical!
Caeldera and CasloFivForRomSC are identical!
Caeldera and CaslonFiveForty are identical!
Caeldera and Casque are identical!
Caeldera and CastellarMT are identical!
Caeldera and CasteMT are identical!
Caeldera and Castiglione are identical!
Caeldera and CCSpi are identical!
Caeldera and CCSpills are identical!
Caeldera and Cecily are identical!



and then the list just continues with more "matching" Caeldera
 
sort

Is there a way to sort the fonts based on their appearance so that ones that look alike are listed together? Then I could manually delete them.

I suppose it is just a judgment call on which one to delete
 
Is there a way to sort the fonts based on their appearance so that ones that look alike are listed together? Then I could manually delete them.

I suppose it is just a judgment call on which one to delete

Actually your problem is pretty much solved right now. The program works correctly, but it seems that you only want to see identical .ttf files, right? then write this:

./duplicatefinder /library/fonts | grep ttf

or because you copied your fonts folder to desktop:

./duplicatefinder ~/desktop/fonts | grep ttf

grep will filter the output and only show the lines containing "ttf", if there are no lines displayed, then there are no identical ttf files!

EDIT: You might wanna change grep ttf to grep .ttf if any of your font names contain ttf in them (e.g Nottferman, made that one up). Also it is bound to take long when doing a byte-by-byte comparison of 32k files, so just wait until it is finished.

EDIT2: Those files without an extension in the fonts directory are just files with 0 bytes of information in them, I opened up a hex editor and checked them personally. So all of them are found to be identical.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.