mirror of
https://github.com/rsms/inter.git
synced 2024-12-26 17:12:35 +03:00
19 lines
386 B
Python
19 lines
386 B
Python
#
|
|
# 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()
|