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: Diacritic Ligature Maker | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
For selected ligatures with appropriate anchors (top_1, top_2, etc.), all possible diacritic variations are created. E.g., A_h -> Adieresis_h, Aacute_h, A_hcircumflex, Adieresis_hcircumflex, etc. | |
""" | |
import itertools, traceback | |
thisFont = Glyphs.font # frontmost font | |
thisFontMaster = thisFont.selectedFontMaster # active master |
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: Align All Components | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Fakes auto-alignment in glyphs that cannot be auto-aligned. | |
""" | |
thisFont = Glyphs.font # frontmost font | |
listOfSelectedLayers = thisFont.selectedLayers # active layers of selected glyphs | |
def process( thisLayer ): |
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: Rebuild Components in Place | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Moves outlines to background, then tries to rebuild the glyph with components in the foreground. Tries to position the accents as precisely as possible. | |
""" | |
import traceback | |
Font = Glyphs.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: New Tab with Flipped Components | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Opens a new edit tab with components that are mirrored horizontally, vertically, or both. | |
""" | |
thisFont = Glyphs.font # frontmost font | |
thisFontMaster = thisFont.selectedFontMaster # active master | |
listOfSelectedLayers = thisFont.selectedLayers # active layers of selected glyphs |
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: Insert Anchors into Ligatures | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Inserts base glyph anchors into ligatures with appropriate extensions. E.g. c_e will have top_1, bottom_1, top_2, bottom_2, and ogonek_2. | |
""" | |
thisFont = Glyphs.font # frontmost font | |
thisFontMaster = thisFont.selectedFontMaster # active master | |
thisFontMasterID = thisFontMaster.id | |
selectedLayers = thisFont.selectedLayers # active layers of selected glyphs |
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: Move accents to custom anchors | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Moves acute(.case) from 'top' to 'top_acute' anchors where available. And other accents likewise. | |
""" | |
Font = Glyphs.font | |
selectedGlyphs = [ x.parent for x in Font.selectedLayers ] | |
def customAnchorName( currentAnchorName, componentName ): |
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: Align all Arabic Double Marks in Current Master | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Re-aligns components in double marks (like shadda_damma-ar) to each other according to their anchors. Only for the current master. | |
""" | |
# brings macro window to front and clears its log: | |
Glyphs.clearLog() |
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: AXt Converter | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Converts glyphs from AXt Encoding to modern Unicode. | |
Attention: this script is not yet finished. | |
Please add suggestions in the Github Wiki: | |
https://github.com/mekkablue/Glyphs-Scripts/wiki/AXt-Converter | |
Thx! | |
""" |
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: Export CSV for Glyphs With Entry and Exit | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Creates a CSV file containing name of the glyph, the x and y distances, and the rectangle area between entry and exit anchors. Works for selected glyphs only. | |
""" | |
thisFont = Glyphs.font # frontmost font | |
thisFontMaster = thisFont.selectedFontMaster # active master | |
listOfSelectedLayers = thisFont.selectedLayers # active layers of selected glyphs |