Quantcast
Channel: Glyphs News, Events and Tutorials
Viewing all articles
Browse latest Browse all 578

Custom Sidebar Entries in Font View

$
0
0

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.

and has the following format:

{
    categories = (
        {
            name = "My Category";
            icon = myTemplate;
            subGroup = (
                {
                    name = "My Group";
                    coverage = (
                        Hallo,
                    );
                }
            );
        },
    );
    languages = (
        {
            name = Esperanto;
            icon = EsperantoTemplate;
            script = esperanto;
            subGroup = (
                {
                    name = Consonants;
                    coverage = (
                        A,
                        B,
                        C,
                    );
                }
            );
        },
    );
}

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

  • Put Category entries into categories=(...);.
  • Put Language entries into languages=(...);.
  • Each entry must have a name.
  • 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 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 do 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 colour information is overwritten for the purpose.


Viewing all articles
Browse latest Browse all 578

Trending Articles