File: cleanupbackgrounds.py

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