GithubHelp home page GithubHelp logo

glyphs-scripts's Introduction

ABOUT

Toshi Omagari's Python scripts for the Glyphs font editor. They are primarily written for the newest versions (or supposed to be).

INSTALLATION

Put the scripts into the Scripts folder which appears when you choose Open Scripts Folder from the Scripts menu. After installation, either choose Refresh Script Menu (Option+Shift+Command+Y) or restart the application.

For some scripts, you will also need to install Tal Leming's Vanilla and may need to install other modules. In Glyphs 2, you can install them from Preferences > Addons.

ABOUT THE SCRIPTS

Metrics & Kerning

  • Batch Metric keys: (GUI) Applies the specified logic of metrics key to the selected glyphs. Vanilla required.
  • Copy Kerning Pairs: (GUI) Copies kerning patterns to another. It supports pair-to-pair and preset group copying. Vanilla required.
  • Copy kerning to Greek & Cyrillic: (GUI) Copies your Latin kerning to the common shapes of Greek and Cyrillic, including small caps, using predefined dictionary. Exceptions and absent glyphs are skipped. It's best used after finishing Latin kerning and before starting Cyrillic and Greek. Vanilla required.
  • Display Unlocked Kerning Pairs: Shows unlocked kerning pairs (exceptions) in the edit view. String part done by Ben Jones, display part done by Toshi Omagari and Georg Seifert.
  • Kerning Exception: (GUI) Makes an kerning exception of the current pair. Note: Current glyph is considered the RIGHT side of the glyph. Vanilla required.
  • Permutation Text Generator: (GUI) Outputs glyph permutation text for kerning. Vanilla required.
  • Rename Kerning Groups: (GUI) Lets you rename kerning names and pairs associated with them. Vanilla required.
  • Report Metrics Keys: (GUI) Reports possibly wrong keys. It reports non-existent glyphs in the keys, glyphs using different keys in each layer, and nested keys. Vanilla required.
  • Set Kerning Groups (Lat-Grk-Cyr): (GUI) Sets kerning groups. Groups Latin Greek and Cyrillic together. I advise you use Split Lat-Grk-Cyr Kerning script later. Vanilla required.
  • Split Lat-Grk-Cyr Kerning: Splits kerning groups of LGC (Latin, Greek, Cyrillic) and reconstructs kerning accordingly. Kern once, split later.

Path

  • Delete Diagonal Nodes Between Extremes: Good for cleaning TTF curve. It removes Diagonal Node Between Extremes, after placing the current outline in the background.
  • Nudge-move by Numerical Value: (GUI) Nudge-moves selected nodes by the values specified in the window. Vanilla required.
  • Report Compatibility by Numbers: Outputs path count, node count, anchor count etc. of selected glyphs in the Macro Window.
  • Report Glyphs with Acute-angled Node: Reports glyphs that have nodes with very acute angle (default: less than 15 degrees).
  • Un-Round Corners: Removes corners of outlines of the selected letters (current master only).

Else

  • Analyse Manuscript: (GUI) Calculates the minimal character set required for the pasted text. Ideal for starting a font for specific text (e.g. book). Vanilla required.
  • Create .case alternate: Duplicates selected glyphs but as components, giving them .case suffix and the sidebearings. Modified from Mekkablue's "Create .ssXX glyph from current layer" script.
  • Duplicate Glyph with Component: Duplicates selected glyphs but as components, giving them 001 suffix or above depending on availability.
  • Export Glyph Annotations as PDF: Generates Glyphs annotations as PDF on Desktop.
  • Export InDesign Tagged Text with All Glyphs: (GUI) Saves InDesign tagged text file that contains all glyphs for typesetting a specimen, using glyph ID.
  • Guideline Locker: (GUI) Locks selected guidelines and unlocks all global guidelines. Vanilla required.
  • Instance Slider: (GUI) Lets you define interpolation values of instances more graphically, using sliders and preview. Vanilla and Robofab required.
  • Search Glyph In Class Features: Searches glyphs in OpenType classes and features if they are used.*
  • Sync Edit Views: Refreshes the edit view contents of non-front files. Have multiple files open! Vanilla required.
  • Transform Images with Proper Maths: (GUI) Batch scale and move images in selected layers, using the maths you learned at school. Based on mekkablue's Transform Images script. Vanilla required.

License

Copyright 2016 Toshi Omagari (@tosche_e). Based on sample codes by Rainer Erich Scheichelbauer (@mekkablue).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file 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.

glyphs-scripts's People

Contributors

davelab6 avatar kosbarts avatar mark2mark avatar mekkablue avatar rafalbuchner avatar schriftgestalt avatar tosche avatar weiweihuanghuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glyphs-scripts's Issues

Un-Round Corners

Using G2.4.3 [1064] through G2.5b [1071], the script Un-Round Corners seems to have some problems. It works fine if the character is very simple, like a square, but if it is a normal glyph it doesn't work at all or in some cases it might un-round one or two corners but not all. The macro panel only shows Start and End, no errors or other verbiage.

Instance Slider doens't work on Glyphs 3

3.0.3 (3081)

Traceback (most recent call last):
  File "Instance Slider.py", line 11
    from robofab.interface.all.dialogs import AskString
  File "dialogs.py", line 136
    print "robofab.interface.all __init__ - finding out where we were."
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("robofab.interface.all __init__ - finding out where we were.")?

Robofab issue? @schriftgestalt

Got an error trying to use this plugin

I got this error msg in console, when trying this script. I don't know what does it means. Thanks for your help.

Start Traceback (most recent call last): File "Instance Slider.py", line 14, in <module> for ins in font.instances: AttributeError: 'NoneType' object has no attribute 'instances' End Start End Instance Slider Error (listClick): 'NoneType' object has no attribute 'previewInstances' Start Traceback (most recent call last): File "Instance Slider.py", line 273, in <module> InstanceSlider() File "Instance Slider.py", line 131, in __init__ font.currentTab.previewInstances = 'live' AttributeError: 'NoneType' object has no attribute 'previewInstances' End Instance Slider Error (listClick): 'NoneType' object has no attribute 'previewInstances' Instance Slider Error (listClick): 'NoneType' object has no attribute 'previewInstances'

Duplicate Glyph with Component error

Hello,
Duplicate Glyph with Component.py
gives me this error on Glyphs 3.2 (3245).

I was trying to apply it to the glyphs: copyright registered published

Traceback (most recent call last):
File "Duplicate Glyph with Component.py", line 39
newSuffix = findSuffix( newGlyphNameBase )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Duplicate Glyph with Component.py", line 27, in findSuffix
if f.glyphs[ glyphName + suffix ] == None:
~~~~~~~~~~^~~~~~~~
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Duplicate Glyph with Component.py problem

Toshi, I am afraid this script Duplicate Glyph with Component.py does not work in the 2.4RC version. I would be very happy if you could by chance update it. Thanks!

LICENSE?

Please license this repository :) I recommend Apache, like the Fill Black repo :)

"Copy Kerning Pairs" broke on Glyphs 3?

Hello!

"Copy Kerning Pairs" script does not seem to work with Glyhps3

Copy Kerning Pairs Error: 'NSKVONotifying_GSFont' object has no attribute 'kerningDict'

;(

Instance Slider error

Instance Slider Error (listClick): NSInvalidArgumentException - -[OC_PythonString name]: unrecognized selector sent to instance 0x7fcacf77e350
I get this error when I try to click on an instance. Version 2.3b (881)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.