From 746d527b8f4bd6b5bc721c51052af98d11fc27c0 Mon Sep 17 00:00:00 2001 From: Rasmus Andersson Date: Fri, 28 Sep 2018 12:45:13 -0700 Subject: fontbuild: strip non-primary layers when generating UFOs --- misc/fontbuild | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'misc/fontbuild') 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() -- cgit v1.2.3