summaryrefslogtreecommitdiff
path: root/misc/fontbuild
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2018-09-28 22:45:13 +0300
committerRasmus Andersson <rasmus@notion.se>2018-10-11 09:38:23 +0300
commit746d527b8f4bd6b5bc721c51052af98d11fc27c0 (patch)
treeb6698239897ccbcf150154aa6976f5595b4699b4 /misc/fontbuild
parent7731641bc9f390b30869029fd0e72b3e34bf240f (diff)
downloadinter-746d527b8f4bd6b5bc721c51052af98d11fc27c0.tar.xz
fontbuild: strip non-primary layers when generating UFOs
Diffstat (limited to 'misc/fontbuild')
-rwxr-xr-xmisc/fontbuild10
1 files changed, 10 insertions, 0 deletions
diff --git a/misc/fontbuild b/misc/fontbuild
index 957358680..cb802c655 100755
--- a/misc/fontbuild
+++ b/misc/fontbuild
@@ -499,6 +499,16 @@ class Main(object):
source.font.lib.clear()
source.font.lib.update(lib)
+ # remove all but the primary (default) layer
+ layers = source.font.layers
+ defaultLayer = layers.defaultLayer
+ delLayerNames = set()
+ for layer in layers:
+ if layer != defaultLayer:
+ delLayerNames.add(layer.name)
+ for layerName in delLayerNames:
+ del layers[layerName]
+
# clear anchors
for g in source.font:
g.clearAnchors()