File: cleanupbackgrounds.py

package info (click to toggle)
fonts-junicode 2.211%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 104,448 kB
  • sloc: python: 304; sh: 236; xml: 18; makefile: 16
file content (13 lines) | stat: -rw-r--r-- 373 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
s = Glyphs.font.selection
for g in s:
	for l in g.layers:
		b = l.background
		while len(b.paths) > 0:
			print("Deleting background paths in " + g.name)
			del b.paths[0]
		if len(b.anchors) > 0:
			print("Deleting background anchors in " + g.name)
			b.anchors = []
		if len(b.components) > 0:
			print("Deleting background components in " + g.name)
			b.components = []