-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a36064
commit ff07dd1
Showing
235 changed files
with
1,702,254 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#MenuTitle: Ysabeau Batch Generate Fonts | ||
# -*- coding: utf-8 -*- | ||
__doc__=""" | ||
Ysabeau Batch Generate Fonts. | ||
""" | ||
|
||
|
||
fileFolder = "~/Documents/Typography/EauDeGaramond/GitHub/3. Glyphs Source Files/" | ||
|
||
otf_path = "~/Documents/Typography/EauDeGaramond/GitHub/2. OpenType Font Files/" | ||
ttf_path = "~/Documents/Typography/EauDeGaramond/GitHub/1. TrueType Font Files/" | ||
|
||
OTF_AutoHint = True | ||
TTF_AutoHint = True | ||
RemoveOverlap = True | ||
UseSubroutines = True | ||
UseProductionNames = True | ||
|
||
|
||
import os | ||
|
||
fileFolder = os.path.expanduser(fileFolder) | ||
fileNames = os.listdir(fileFolder) | ||
|
||
print fileNames | ||
|
||
for fileName in fileNames: | ||
if os.path.splitext(fileName)[1] == ".glyphs": | ||
font = GSFont(os.path.join(fileFolder, fileName)) | ||
print font.familyName | ||
for instance in font.instances: | ||
print "== Exporting OTF ==" | ||
print instance.generate(Format = "OTF", FontPath = os.path.expanduser(otf_path), AutoHint = OTF_AutoHint, RemoveOverlap = RemoveOverlap, UseSubroutines = UseSubroutines, UseProductionNames = UseProductionNames) | ||
for instance in font.instances: | ||
print "== Exporting TTF ==" | ||
print instance.generate(Format = "TTF", FontPath = os.path.expanduser(ttf_path), AutoHint = TTF_AutoHint, RemoveOverlap = RemoveOverlap, UseProductionNames = UseProductionNames) | ||
#for instance in font.instances: | ||
# print "== Exporting WOFF ==" | ||
# print instance.generate(Format = "WOFF", FontPath = os.path.expanduser(web_path), AutoHint = TTF_AutoHint, RemoveOverlap = RemoveOverlap, UseSubroutines = UseSubroutines, UseProductionNames = UseProductionNames) | ||
88 changes: 88 additions & 0 deletions
88
3. Glyphs Source Files/Ysabeau Italic Make Export Instances.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#MenuTitle: Ysabeau Italic Make Export Instances | ||
# -*- coding: utf-8 -*- | ||
"""Injects and/or updates the Rename Glyphs custom parameters in the .glyphs file.""" | ||
|
||
import GlyphsApp | ||
|
||
|
||
# Infant | ||
Font = Glyphs.font | ||
|
||
suffix = ".ss01" | ||
all01names = [ g.name for g in Font.glyphs if (g.name.find(suffix) > 0) ] | ||
renameGlyphs1 = [ "%s=%s" % ( x, x.replace(suffix,"") ) for x in all01names ] | ||
renameGlyphsParameterKey = "Rename Glyphs" | ||
|
||
forbidden = all01names | ||
forbidden = [ x.replace(".ss01", ".ss02") for x in forbidden ] | ||
|
||
suffix = ".ss02" | ||
all02names = [ g.name for g in Font.glyphs if (g.name.find(suffix) > 0) ] | ||
good02names = all02names | ||
for x in forbidden: | ||
if x in all02names: | ||
good02names.remove(x) | ||
|
||
renameGlyphs2 = [ "%s=%s" % ( x, x.replace(suffix,"") ) for x in good02names ] | ||
|
||
suffix = ".ss03" | ||
all03names = [ g.name for g in Font.glyphs if (g.name.find(suffix) > 0) ] | ||
good03names = all03names | ||
for x in forbidden: | ||
if x in all03names: | ||
good03names.remove(x) | ||
|
||
renameGlyphs3 = [ "%s=%s" % ( x, x.replace(suffix,"") ) for x in good03names ] | ||
|
||
|
||
forbidden = all01names | ||
forbidden = [ x.replace(".ss01", ".loclBGR") for x in forbidden ] | ||
|
||
suffix = ".loclBGR" | ||
allBGRnames = [ g.name for g in Font.glyphs if (g.name.find(suffix) > 0) ] | ||
renameGlyphs4 = [ "%s=%s" % ( x, x.replace(suffix,"") ) for x in allBGRnames ] | ||
|
||
suffix = ".lf" | ||
allLFGlyphNames = [ g.name for g in Font.glyphs if g.name.endswith(suffix) ] | ||
renameGlyphs5 = [ "%s=%s" % ( x, x.replace(suffix,"") ) for x in allLFGlyphNames ] | ||
|
||
#decomposeGlyphs = all01names + allLFGlyphNames | ||
decomposeGlyphs = [g.name for g in Font.glyphs] | ||
|
||
for thisInstance in Font.instances: | ||
parameterFamilyName = thisInstance.customValueForKey_("familyName") | ||
if parameterFamilyName: | ||
familyName = parameterFamilyName | ||
else: | ||
familyName = Font.familyName | ||
if familyName.endswith("Infant"): | ||
thisInstance.removeObjectFromCustomParametersForKey_( renameGlyphsParameterKey ) | ||
thisInstance.setCustomParameter_forKey_( renameGlyphs1 + renameGlyphs2 + renameGlyphs3 + renameGlyphs4 + renameGlyphs5, renameGlyphsParameterKey ) | ||
thisInstance.setCustomParameter_forKey_( ["ss01", "ss02", "lnum", "locl"], "Remove Features" ) | ||
thisInstance.removeObjectFromCustomParametersForKey_( "Decompose Glyphs" ) | ||
thisInstance.setCustomParameter_forKey_( decomposeGlyphs, "Decompose Glyphs" ) | ||
|
||
|
||
# Text | ||
Font = Glyphs.font | ||
|
||
suffix = ".ss02" | ||
all02names = [ g.name for g in Font.glyphs if (g.name.find(suffix) > 0) ] | ||
renameGlyphs2 = [ "%s=%s" % ( x, x.replace(suffix,"") ) for x in all02names ] | ||
renameGlyphsParameterKey = "Rename Glyphs" | ||
|
||
#decomposeGlyphs = all02names | ||
decomposeGlyphs = [g.name for g in Font.glyphs] | ||
|
||
for thisInstance in Font.instances: | ||
parameterFamilyName = thisInstance.customValueForKey_("familyName") | ||
if parameterFamilyName: | ||
familyName = parameterFamilyName | ||
else: | ||
familyName = Font.familyName | ||
if familyName.endswith("Text"): | ||
thisInstance.removeObjectFromCustomParametersForKey_( renameGlyphsParameterKey ) | ||
thisInstance.setCustomParameter_forKey_( renameGlyphs2, renameGlyphsParameterKey ) | ||
thisInstance.setCustomParameter_forKey_( ["ss02"], "Remove Features" ) | ||
thisInstance.removeObjectFromCustomParametersForKey_( "Decompose Glyphs" ) | ||
thisInstance.setCustomParameter_forKey_( decomposeGlyphs, "Decompose Glyphs" ) |
103 changes: 103 additions & 0 deletions
103
3. Glyphs Source Files/Ysabeau Make Export Instances.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
#MenuTitle: Ysabeau Make Export Instances | ||
# -*- coding: utf-8 -*- | ||
"""Injects and/or updates the Rename Glyphs custom parameters in the .glyphs file.""" | ||
|
||
import GlyphsApp | ||
|
||
|
||
# Infant | ||
Font = Glyphs.font | ||
|
||
suffix = ".ss01" | ||
all01names = [ g.name for g in Font.glyphs if (g.name.find(suffix) > 0) ] | ||
renameGlyphs1 = [ "%s=%s" % ( x, x.replace(suffix,"") ) for x in all01names ] | ||
renameGlyphsParameterKey = "Rename Glyphs" | ||
|
||
forbidden = all01names | ||
forbidden = [ x.replace(".ss01", ".ss02") for x in forbidden ] | ||
|
||
suffix = ".ss02" | ||
all02names = [ g.name for g in Font.glyphs if (g.name.find(suffix) > 0) ] | ||
good02names = all02names | ||
for x in forbidden: | ||
if x in all02names: | ||
good02names.remove(x) | ||
|
||
renameGlyphs2 = [ "%s=%s" % ( x, x.replace(suffix,"") ) for x in good02names ] | ||
|
||
|
||
forbidden = all01names | ||
forbidden = [ x.replace(".ss01", ".loclBGR") for x in forbidden ] | ||
|
||
suffix = ".loclBGR" | ||
allBGRnames = [ g.name for g in Font.glyphs if (g.name.find(suffix) > 0) ] | ||
renameGlyphs3 = [ "%s=%s" % ( x, x.replace(suffix,"") ) for x in allBGRnames ] | ||
|
||
suffix = ".lf" | ||
allLFGlyphNames = [ g.name for g in Font.glyphs if g.name.endswith(suffix) ] | ||
renameGlyphs4 = [ "%s=%s" % ( x, x.replace(suffix,"") ) for x in allLFGlyphNames ] | ||
|
||
#decomposeGlyphs = all01names + allLFGlyphNames | ||
decomposeGlyphs = [g.name for g in Font.glyphs] | ||
|
||
for thisInstance in Font.instances: | ||
parameterFamilyName = thisInstance.customValueForKey_("familyName") | ||
if parameterFamilyName: | ||
familyName = parameterFamilyName | ||
else: | ||
familyName = Font.familyName | ||
if familyName.endswith("Infant"): | ||
thisInstance.removeObjectFromCustomParametersForKey_( renameGlyphsParameterKey ) | ||
thisInstance.setCustomParameter_forKey_( renameGlyphs1 + renameGlyphs2 + renameGlyphs3 + renameGlyphs4, renameGlyphsParameterKey ) | ||
thisInstance.setCustomParameter_forKey_( ["ss01", "ss02", "lnum", "locl"], "Remove Features" ) | ||
thisInstance.removeObjectFromCustomParametersForKey_( "Decompose Glyphs" ) | ||
thisInstance.setCustomParameter_forKey_( decomposeGlyphs, "Decompose Glyphs" ) | ||
|
||
|
||
# Text | ||
Font = Glyphs.font | ||
|
||
suffix = ".ss02" | ||
all02names = [ g.name for g in Font.glyphs if (g.name.find(suffix) > 0) ] | ||
renameGlyphs2 = [ "%s=%s" % ( x, x.replace(suffix,"") ) for x in all02names ] | ||
renameGlyphsParameterKey = "Rename Glyphs" | ||
|
||
#decomposeGlyphs = all02names | ||
decomposeGlyphs = [g.name for g in Font.glyphs] | ||
|
||
for thisInstance in Font.instances: | ||
parameterFamilyName = thisInstance.customValueForKey_("familyName") | ||
if parameterFamilyName: | ||
familyName = parameterFamilyName | ||
else: | ||
familyName = Font.familyName | ||
if familyName.endswith("Text"): | ||
thisInstance.removeObjectFromCustomParametersForKey_( renameGlyphsParameterKey ) | ||
thisInstance.setCustomParameter_forKey_( renameGlyphs2, renameGlyphsParameterKey ) | ||
thisInstance.setCustomParameter_forKey_( ["ss02"], "Remove Features" ) | ||
thisInstance.removeObjectFromCustomParametersForKey_( "Decompose Glyphs" ) | ||
thisInstance.setCustomParameter_forKey_( decomposeGlyphs, "Decompose Glyphs" ) | ||
|
||
|
||
# Smallcaps | ||
Font = Glyphs.font | ||
|
||
allSCnames = [ g.name for g in Font.glyphs if (g.name.find(".sc") > 0) ] | ||
renameSC = [ "%s=%s" % ( x, x.replace(".sc","") ) for x in allSCnames ] | ||
|
||
#decomposeGlyphs = allSCnames | ||
decomposeGlyphs = [g.name for g in Font.glyphs] | ||
|
||
for thisInstance in Font.instances: | ||
parameterFamilyName = thisInstance.customValueForKey_("familyName") | ||
if parameterFamilyName: | ||
familyName = parameterFamilyName | ||
else: | ||
familyName = Font.familyName | ||
if familyName.endswith("SC"): | ||
thisInstance.removeObjectFromCustomParametersForKey_( renameGlyphsParameterKey ) | ||
thisInstance.setCustomParameter_forKey_( renameSC, renameGlyphsParameterKey ) | ||
thisInstance.setCustomParameter_forKey_( ["liga","dlig","smcp","c2sc"], "Remove Features" ) | ||
thisInstance.removeObjectFromCustomParametersForKey_( "Decompose Glyphs" ) | ||
thisInstance.setCustomParameter_forKey_( decomposeGlyphs, "Decompose Glyphs" ) | ||
|
Oops, something went wrong.