This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MenuTitle: Baseline Wiggle | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Create pseudorandom GPOS baseline shift for all glyphs. | |
""" | |
import random | |
random.seed() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MenuTitle: Beowulferize | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Turns selected glyphs into a pseudorandom Beowulf-lookalike. | |
""" | |
# Please adjust to your own needs: | |
alphabets = 5 # how many variants of each glyph will be created | |
shatter = 12 # how far each single node may be moved each time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MenuTitle: Wackelpudding | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Create pseudorandom rotation feature for selected glyphs. | |
""" | |
maxangle = 20.0 # Maximum angle by which a glyph may rotate | |
minangle = 4.0 | |
alphabets = 5 # Instances of rotated glyphs | |
linelength = 80 # length of the line the feature should be working on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MenuTitle: Glyph Names as Discretionary Ligatures | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Adds names of exporting glyphs without a Unicode value as ligatures into the dlig feature. | |
""" | |
thisFont = Glyphs.font # frontmost font | |
def updated_code( oldcode, beginsig, endsig, newcode ): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MenuTitle: Wrap and Extend Features | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Enclose all features with lookups and divide them into sub groups of 3000 lines max. It will also add the useExtension parameter allowing you to have a 32 bits limit insead of the 16 bits. | |
""" | |
import string | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MenuTitle: Build Kana Features | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Creates hkna, vkna and pkna OpenType features for Kana. | |
""" | |
thisFont = Glyphs.font # frontmost font | |
features = ("pkna","vkna") | |
def updatedCode( oldCode, beginSig, endSig, newCode ): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MenuTitle: Build ccmp for Hebrew Presentation Forms | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Builds the ccmp for precomposed uniFBxx glyphs, e.g. if you padagesh, you get 'sub pa dagesh by padagesh' in your ccmp. | |
""" | |
lookupTitle = "hebrewPresentationForms" | |
thisFont = Glyphs.font | |
theseGlyphs = thisFont.glyphs | |
firstMasterID = thisFont.masters[0].id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MenuTitle: Check Glyph Names | |
# encoding: utf-8 | |
__doc__=""" | |
Goes through all glyph names and looks for illegal characters. | |
""" | |
firstChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" | |
otherChars = "0123456789._-" | |
legalChars = firstChars + otherChars | |
allowedNameExceptions = (".notdef", ".null") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MenuTitle: Copy Unicode-Sorted Glyph Name List | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Creates a glyph list of all encoded glyphs, in Unicode order, and puts in your clipboard for pasting. | |
""" | |
from AppKit import NSPasteboard | |
thisFont = Glyphs.font # frontmost font |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MenuTitle: Create Center Guideline | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Creates a guideline, horizontally or vertically centered between two selected nodes. | |
""" | |
Font = Glyphs.font | |
FontMaster = Font.selectedFontMaster | |
selectedLayers = Font.selectedLayers | |
selectedLayer = selectedLayers[0] |