Skip to content

Commit

Permalink
Add submodule pointer
Browse files Browse the repository at this point in the history
Add ExportClassKerningToUFO.py, which mirrors FontLab Class kerning into a UFO file.
  • Loading branch information
frankrolf committed Apr 3, 2013
1 parent 06ec858 commit 62b7ff1
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "Modules"]
path = Modules
url = https://github.com/adobe-type-tools/python-modules
30 changes: 30 additions & 0 deletions Kerning/ExportClassKerningToUFO.py
@@ -0,0 +1,30 @@
#FLM: Export FontLab class kerning to UFO
import os
moduleFound = False

try:
from kernExport import *
reload(kernExport)
moduleFound = True

except ImportError:
modulePath = os.path.join(fl.userpath, 'Macros', 'System', 'Modules')
url = 'https://github.com/adobe-type-tools/python-modules'
print '''
Please make sure you have placed the "kernExport.py" module in your Macros/System/Modules folder:
%s
Get the module here:
%s
''' % (modulePath, url)


if moduleFound:

# three options are possible; for further details see kernExport.__doc__:
# kernExport.ClassKerningToUFO(fl.font, prefixOption = 'MM') # prefix kerning classes in MetricsMachine-style
# kernExport.ClassKerningToUFO(fl.font, prefixOption = 'UFO3') # prefix kerning classes in UFO3-style
# kernExport.ClassKerningToUFO(fl.font) # do not change the name of kerning classes (apart from side markers)

kernExport.ClassKerningToUFO(fl.font, 'MM')
1 change: 1 addition & 0 deletions Modules
Submodule Modules added at 905a8e

0 comments on commit 62b7ff1

Please sign in to comment.