Custom Sidebar Entries in Font View

  • by Rainer Erich Scheichelbauer
  • Tutorial

You can add your own categories or languages to the sidebar in Font View. Glyphs will look for a file called Groups.plist in ~/Library/Application Support/Glyphs/Info/. To navigate there quickly, choose Script > Open Scripts Folder (Cmd-Shift-Y), and look for a folder called Info next to Scripts. If it is not there, create it with the Finder command File > New Folder (Cmd-Shift-N).

And inside the Info folder, you create Groups.plist with a text editor, preferably one with syntax colouring for Apple Property list files (file suffix .plist). I can recommend TextWrangler, TextMate, BBEdit, or SublimeText.

Custom entries for categories and languages have the following format:

{
    categories = (
        {
            name = "Compatibility";
            icon = compatibilityTemplate;
            subGroup = (
                {
                    name = "Web";
                    coverage = (
                        .notdef,
                        hyphen,
                        space
                    );
                },
                {
                    name = "Windows";
                    coverage = (
                        nbspace,
                        softhyphen
                    );
                }
            );
        },
    );
    languages = (
        {
            name = "Esperanto";
            icon = EsperantoTemplate;
            script = latin;
            subGroup = (
                {
                    name = "Letters";
                    coverage = (
                        Ccircumflex,
                        ccircumflex,
                        Gcircumflex,
                        gcircumflex,
                        Hcircumflex,
                        hcircumflex,
                        Jcircumflex,
                        jcircumflex,
                        Scircumflex,
                        scircumflex,
                        Ubreve,
                        ubreve
                    );
                },
                {
                    name = "Marks";
                    coverage = (
                        circumflexcomb,
                        brevecomb
                    );
                }
            );
        },
    );
}

Copy and paste this sample Groups.plist content into your preferred text editor, adjust it to your liking, and save it as explained above. Then restart Glyphs, and the sidebar should look approximately like this:

Things to Consider

When setting up your Categories and Languages, you have to stick to a few rules:

  • Put Category entries into categories=(...);.
  • Put Language entries into languages=(...);.
  • Each entry must have a name. You can leave out the straight quotes if the specified name has no spaces in it.
  • Each item in an entry must be terminated with a semicolon.
  • Each entry can either have a subGroup for nesting entries, or a comma-separated coverage list. They are mutually exclusive.
  • Top level entries can also have a script attribute. They will filter for the script tag if it is selected in the sidebar.
  • Entries can have an icon. The name specified must end in Template. You do not need to specify the file suffix. See below for details.

Adding Icons

Glyphs will look for an image file with the specified name in a subfolder called Icons next to the Groups.plist file.

The icons can be in any image format that is supported by Mac OS. We recommend using black and white PDFs, because they scale. Make sure it is no more than 16 pixels high (16 pt at 72 dpi), and more or less as wide as it is high, so it fits nicely next to the name in the sidebar.

If you desperately want to use a pixel image, you will need to have two files in order to also support Retina screens: One must have 16×16 pixels, the other one 32×32 pixels. The large image needs to have a @2x extension in the file name, right before the dot suffix, e.g., esperantoTemplate.png and esperantoTemplate@2x.png. Again, the image name should end with Template. Then, the image is used as a mask to only use the alpha value. All color information is overwritten for the purpose.


UPDATE 2016-03-26: Fixed subGroup separation. Thx @zen and @kosbarts for reporting.
UPDATE 2017-03-16: Fixed latin script tag in the sample. Thx @timahrens for reporting.