Sorting fonts into subfolders, Manufacturer ignored

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

I'm building an action to sort fonts for me. Fonts should be sorted into subfolders based on family name within a subfolder for the manufacturer. It looks like this…

Image

The font family I am sorting has a manufacturer tag, at least according to Font Explorer…

Image

But the Manufacturer folder is not created, only the Font Family folder. How do I tell Hazel to recognize, capture, and use the Manufacturer for a folder name?

Also, is there a way to unhide files with Hazel? Currently I am batch renaming with Forklift to remove the leading period.
leftnotracks
 
Posts: 23
Joined: Sat Oct 29, 2016 3:58 am

Try temporarily adding a condition to match on manufacturer. Preview the rule and then click on the badge for that condition. That should show you what Hazel sees as the manufacturer, if anything. It may very well be the case that that info is not being filled out.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Try temporarily adding a condition to match on manufacturer. Preview the rule and then click on the badge for that condition. That should show you what Hazel sees as the manufacturer, if anything. It may very well be the case that that info is not being filled out.

Good advice. The test file’s manufacturer is Dharma Type. Adding a condition for Manufacturer = "Dharma Type" or even Manufacturer contains "Dharma" excludes the file. So Hazel has a condition that doesn’t work. This probably goes deeper than Hazel. Finder cannot find the file either after adding the same condition. Even searching for Manufacturer contains "a" fails.

I tried a different field: Trademark. Finder’s Get Info window shows the Trademark is "Bio Sans is a trademark of Dharma Type". Adding Trademark contains "Dharma" excluded the file. So Finder can read Trademark but Hazel can’t. Searching for Trademark contains "Dharma" in the Finder did not find the font.

Image

Further testing found something interesting. The fonts I downloaded fail the search. But the tags are found (searching all files for Manufacturer = "Dharma Type" or Trademark contains "Dharma") in a folder used by Font Explorer (/Users/[me]/Library/Caches/Metadata/FontExplorer X/). The files are not fonts.

Edit: One more thing. When I do a generic search for "Dharma" in the finder, just in a folder window’s search field, it finds the file. I just wish I knew where it was finding it.
leftnotracks
 
Posts: 23
Joined: Sat Oct 29, 2016 3:58 am

You shouldn't rely on Font Explorer as it's actually parsing the files. Hazel and Finder will only see what is exported by Spotlight. If you select the file in Finder and do "Get Info", you should see what's actually available in the "More Info" section. You should stick to using the attributes there.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:You shouldn't rely on Font Explorer as it's actually parsing the files. Hazel and Finder will only see what is exported by Spotlight. If you select the file in Finder and do "Get Info", you should see what's actually available in the "More Info" section. You should stick to using the attributes there.

I did. I tried searching for Trademark contains "Dharma" as shown in the Trademark section of the Finder’s Get Info window. No result in Hazel, nothing found in Finder.
leftnotracks
 
Posts: 23
Joined: Sat Oct 29, 2016 3:58 am

If you preview the condition in Hazel and click on the badge, it will show you the value that Hazel sees. Can you report back on what it shows there?
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Manufacturer is empty. Copyright of the font is empty. Copyright information about this item matches. So that must be what the Finder is finding.

There is some metadata in the file for manufacturer, through. Finder doesn’t see it, Hazel doesn’t see it, but Font Explorer does. It then creates a meta tag file with the tag properly applied.

Here is the metadata for the font I am testing, which is Birra Stout from Darden Studios (mdls in Terminal):

Code: Select all
com_apple_ats_name_family          = (
    Birra2
)
com_apple_ats_name_fond            = (
    "Birra2 Stout"
)
com_apple_ats_name_full            = (
    "Birra2 Stout"
)
com_apple_ats_name_postscript      = (
    "Birra2-Stout"
)
com_apple_ats_name_style           = (
    Stout
)
com_apple_ats_names                = (
    Birra2,
    "Birra2 Stout",
    "Birra2-Stout",
    "Copyright (c) 2008-2016 by Darden Studio. All rights reserved.",
    "Darden Studio",
    Stout,
    "Version 2.000"
)
kMDItemAuthors                     = (
    "Darden Studio"
)
kMDItemContentCreationDate         = 2018-10-22 04:33:04 +0000
kMDItemContentCreationDate_Ranking = 2018-10-22 00:00:00 +0000
kMDItemContentModificationDate     = 2018-10-22 04:33:05 +0000
kMDItemContentType                 = "public.opentype-font"
kMDItemContentTypeTree             = (
    "public.opentype-font",
    "public.font",
    "public.opentype-font",
    "public.data",
    "public.item"
)
kMDItemCopyright                   = "Copyright (c) 2008-2016 by Darden Studio. All rights reserved."
kMDItemDateAdded                   = 2018-10-24 15:59:53 +0000
kMDItemDateAdded_Ranking           = 2018-10-24 00:00:00 +0000
kMDItemDisplayName                 = "Birra2 Stout.otf"
kMDItemFonts                       = (
    Birra2,
    "Birra2 Stout",
    "Birra2-Stout",
    Stout
)
kMDItemFSContentChangeDate         = 2018-10-22 04:33:05 +0000
kMDItemFSCreationDate              = 2018-10-22 04:33:04 +0000
kMDItemFSCreatorCode               = ""
kMDItemFSFinderFlags               = 0
kMDItemFSHasCustomIcon             = (null)
kMDItemFSInvisible                 = 0
kMDItemFSIsExtensionHidden         = 0
kMDItemFSIsStationery              = (null)
kMDItemFSLabel                     = 0
kMDItemFSName                      = "Birra2 Stout.otf"
kMDItemFSNodeCount                 = (null)
kMDItemFSOwnerGroupID              = 20
kMDItemFSOwnerUserID               = 501
kMDItemFSSize                      = 138436
kMDItemFSTypeCode                  = ""
kMDItemInterestingDate_Ranking     = 2018-10-22 00:00:00 +0000
kMDItemKind                        = "OpenType® font"
kMDItemLogicalSize                 = 138436
kMDItemPhysicalSize                = 139264
kMDItemPublishers                  = (
    "Darden Studio"
)
kMDItemVersion                     = "Version 2.000"


Darden is listed five times: three listings for "Darden Stdio" and two copyright references. Hazel is able to find only one instance, the second Copyright reference (note the different ©).
Image

This is the same copyright listed in the Finder’s Get Info window:
Image

Search terms that have not worked in Hazel:
    Manufacturer of the font
    Copyright of the font
    Authors of this item
    Publisher of this document
    Description of the font
    Version of the font
    Vendor fo the font
    Trademark fo the font

Finder can find at least three:
    Copyright information about this item
    Publisher of this document
    Authors of this item
Image

The font manufacturer is stored in the file in at least five places, but Hazel can only find one of them, and it's not the one I would like.

Edit: Hazel seems to be doing the same thing as the Finder, but the search had to match exactly. Searching for "Darden" failed, but searching for "Darden Studio" worked.
Image
Image

This means I am able to create a subfolder for Publisher (if the tag exists) but not Manufacturer. This is not ideal, but it is an improvement. Thanks for helping me follow through with this. I am constantly impressed with Hazel’s usefulness.
leftnotracks
 
Posts: 23
Joined: Sat Oct 29, 2016 3:58 am

The problem is Font Explorer is not exporting that data. Hazel (and Finder) only see what the Spotlight importer allows it to see. Even if Font Explorer can read that info, it doesn't provide that info to the system for other apps to use.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Font Explorer has nothing to do with the files I am working with. I mentioned Font Explorer because it is able to read the Manufacturer data in the font, but the Finder and Hazel are not. Font explorer does not modify fonts imported into its catalogue, except to sort them into its folder structure. It seems to create a separate file to store metadata for each font file. The fonts I am sorting have not been imported into Font Explorer (except the one mentioned for testing).
leftnotracks
 
Posts: 23
Joined: Sat Oct 29, 2016 3:58 am

Nonetheless, an app of some sort must provide the Spotlight data so the rest of the system, including Hazel, can see it. If not, then you'll have to come up with a script which runs a special program that can provide that info.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron