mekkablue / Glyphs-Scripts

Python scripts for the Glyphs font editor
http://glyphsapp.com/
Apache License 2.0
387 stars 103 forks source link

ABOUT

These are Python scripts intended for font production in the Glyphs font editor.

INSTALLATION

Glyphs 3

  1. Install the modules: In Window > Plugin Manager, click on the Modules tab, and make sure at least the Python and Vanilla modules are installed. If they were not installed before, restart the app.
  2. Install the scripts: Go to Window > Plugin Manager and click on the Scripts tab. Scroll down to mekkablue scripts and click on the Install button next to it.

Now the scripts are available in Script > mekkablue. If the mekkablue scripts do not show up in the Script menu, hold down the Option key and choose Script > Reload Scripts (Cmd-Opt-Shift-Y).

Glyphs 2

Video installation guide for Glyphs 2

There is a tutorial video on how to install the mekkablue scripts available on YouTube. While you are there, feel free to subscribe to the mekkablue channel.

General installation guide for Glyphs 2

The scripts need to be in the Scripts folder inside the app’s Application Support folder. Here is how:

  1. Put the scripts folder (or an alias) into the Scripts folder which appears when you choose Script > Open Scripts Folder (Cmd-Shift-Y): ~/Library/Application Support/Glyphs/Scripts/, or, better yet, use git for that. See below.
  2. Then, hold down the Option (Alt) key, and choose Script > Reload Scripts (Cmd-Opt-Shift-Y). Now the scripts are visible in the Script menu
  3. For some of the scripts, you will also need to install Tal Leming's Vanilla: Go to Glyphs > Preferences > Addons > Modules and click the Install Modules button. That’s it.

git installation for Glyphs 2

I recommend to use git for getting the scripts, because it is easier for you to keep them up to date. Use this git command for cloning the repository into your Scripts folder:

git clone https://github.com/mekkablue/Glyphs-Scripts ~/Library/Application\ Support/Glyphs/Scripts/mekkablue/

If the terminal scares you, feel free to use one of the many readily available git clients, e.g. the free Source Tree or GitHub Desktop.

After you installed the mekkablue scripts, you can update this script repository (and all the others you have in your Scripts folder) by running Scripts > mekkablue > App > Update git Repositories in Scripts Folder.

TROUBLESHOOTING

Please report problems and request features as a GitHub issue. Make sure you have the latest version of the scripts and your app is up to date. And please, always indicate both your Glyphs and macOS version. Thank you.

REQUIREMENTS

The scripts require a recent version of Glyphs 2.x running on macOS 10.9 or later. I can only test them and make them work in the latest version of the software. If a script is not working for you, please first update to the latest version of the script.

ABOUT THE SCRIPTS

All the scripts show a tooltip when you hover the mouse pointer over their menu entry. In scripts with a GUI, most UI elements (checkboxes, text entry fields, etc.) have tooltips as well. This way you get the explanation you need right where it counts.

Anchors

Anchor Mover is for batch-processing anchor positions. Can be useful after adjusting the x-height. No-brainer: I always use the Reposition script on my combining marks, so stacking combining marks stays in the italic angle.

App

If you are coding, add a keyboard shortcut for Method Reporter, you will need this a lot. Print Window can come in handy if you want a resolution-independent PDF screenshot of your window content. Best for post-processing in a vector illustration app.

Build Glyphs

Most important: Quote Manager, and the Build scripts for Small Figures, Symbols, Ldot. The other scripts are mainly intended to give you a quick head start for covering certain Unicode ranges if requested by the client.

Color Fonts

These scripts are for situations you will encounter in a Color Font workflow. The Merge script is mainly for creating a fallback glyph for CPAL/COLR fonts. This way the fallback has the full bbox, and no clipping will occur in Chrome.

Compare Frontmost Fonts

These scripts are intended for syncing uprights with their italics. Open two fonts, and run the scripts. They do not change your fonts, but report in detail in the Macro window.

Components

Populate Backgrounds with Components is very useful when you build letters based on other, e.g., ae or oe can take an e in the background. The script puts the e in the background of each master, and the UI has an option to align selected points with the e in the background. If you use corner components for serifs in a multiple-master font, the Propagate script will save you a lot of time.

Features

In script typefaces, you may often need the Build Positional calt script. If you find yourself turning OT features on and off a lot, take a look at the Activate Default Features and Floating Features scripts. And check out the Set Palette from Window > Plugin Manager.

Font Info

Vertical Metrics is useful for finding and syncing the vertical metric parameters in Font Info > Font and Font Info > Masters. Clean Version String is very useful too. Font Info Batch Setter is a must for syncing Font Info settings across many fonts. Careful about Set WWS/Preferred Names scripts: The app usually takes care of naming automatically, so their use cases are very rare.

Glyph Names, Notes and Unicode

Most scripts make managing glyph names and Unicodes a little easier. Garbage Collection is useful for cleaning up the mess of the reporter scripts, or other annotations before you hand the files over to a third party.

Guides

These scripts are mostly intended for cleaning up the plethora of guides I see when working on third-party fonts.

Hinting

Most important: Set blueScale, Set Family Alignment Zones for PostScript hinting. If you are making big changes, The Transfer and Keep Only scripts can save you a lot of work. The New Tab scripts help find glyphs missing zones. Also consider Paths > Find Near Vertical Misses for that purpose.

Images

Mainly intended for curing the headaches you may undergo when handling a lot of (background) images.

Interpolation

Most important: Insert Instances (for determining your instances and their style linking), Kink Finder and Find Shapeshifting Glyphs. I use Show Next/Previous Instance with the keyboard shortcut ctrl-up/down a lot.

Kerning

Most important: Auto Bumper, KernCrasher, GapFinder, Sample String Maker. If you have too much kerning, consider Exception Cleaner.

Paths

I use Rotate Around Anchor for my asterisks. Important for outline checking: Path Problem Finder, Find Near Vertical Misses and the Green Blue Manager. Rewire Fire has become important in OTVar production, because it helps reduce duplicate outline segments at shape edges (which create dark spots in anti-aliasing).

Pixelfonts

These scripts are useful for a pixelfont workflow, where you place a pixel component in a coarser grid. If you are doing pixel designs, take a look at the pixel-related plug-ins available in Window > Plugin Manager.

Post Production

The DSIG and GDEF scripts are not necessary anymore if you run the latest Glyphs version. For Italic exports, I recommend fixing PS Names and STAT Entries. The Upgrade STAT script is optional, it adds ranges which are still hardly supported by software, but may make sense as future-proofing.

Smallcaps

When I have Smallcaps in my font, I always run Check Smallcap Consistency. Take its report with a grain of salt though: it lists a lot of false positives, and not every warning is equally important.

Spacing

Most important: Fix Math Operator Spacing, Bracket Metrics Manager and, if you have arrows, Fix Arrow Positioning. The New Tab scripts are useful when creating figures.

Test

Most important: the Test HTML scripts. If you have unusually high or low text selection highlights in Adobe or Apple apps, run Report Highest and Lowest Glyphs to find the glyph causing it. Language Report is just for beefing up your specimen, and will not give you authoritative information.

License

Copyright 2011 The mekkablue Glyphs-Scripts Project Authors.

Some code samples by Georg Seifert (@schriftgestalt) and Tal Leming (@typesupply).

Some algorithm input by Christoph Schindler (@hop) and Maciej Ratajski (@maciejratajski).

Some code fixes from Rafał Buchner (@RafalBuchner).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use the software provided here except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

See the License file included in this repository for further details.