blob: a990cd3e8418a8d2e2cc9a6c6b5275be2264d094 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#
# Selects all glyphs which are empty
#
import sys
def isEmpty(g):
for master in g.parent.masters:
layer = g.layers[master.id]
if layer.bounds is not None and layer.bounds.size.width > 0:
return False
return True
font = Glyphs.font
font.disableUpdateInterface()
try:
font.selection = [g for g in font.glyphs if isEmpty(g)]
finally:
font.enableUpdateInterface()
|