From 62b7ff12b4e05a686bc632c31777bf7d05eca659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Grie=C3=9Fhammer?= Date: Tue, 2 Apr 2013 17:17:40 -0700 Subject: [PATCH] Add submodule pointer Add ExportClassKerningToUFO.py, which mirrors FontLab Class kerning into a UFO file. --- .gitmodules | 3 +++ Kerning/ExportClassKerningToUFO.py | 30 ++++++++++++++++++++++++++++++ Modules | 1 + 3 files changed, 34 insertions(+) create mode 100644 .gitmodules create mode 100644 Kerning/ExportClassKerningToUFO.py create mode 160000 Modules diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..5451bd1 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Modules"] + path = Modules + url = https://github.com/adobe-type-tools/python-modules diff --git a/Kerning/ExportClassKerningToUFO.py b/Kerning/ExportClassKerningToUFO.py new file mode 100644 index 0000000..5459d1c --- /dev/null +++ b/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') diff --git a/Modules b/Modules new file mode 160000 index 0000000..905a8ef --- /dev/null +++ b/Modules @@ -0,0 +1 @@ +Subproject commit 905a8ef692008d4432eb4ce4e68182afa8281e68