diff options
author | Rasmus Andersson <rasmus@notion.se> | 2018-09-28 22:45:13 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2018-10-11 09:38:23 +0300 |
commit | 746d527b8f4bd6b5bc721c51052af98d11fc27c0 (patch) | |
tree | b6698239897ccbcf150154aa6976f5595b4699b4 /misc | |
parent | 7731641bc9f390b30869029fd0e72b3e34bf240f (diff) | |
download | inter-746d527b8f4bd6b5bc721c51052af98d11fc27c0.tar.xz |
fontbuild: strip non-primary layers when generating UFOs
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/fontbuild | 10 |
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() |