DesignspaceProblems
DesignspaceProblems copied to clipboard
improve checking of discrete spaces.
DSE reports incompatibilities between glyphs that are in different discrete locations.
Check group identities for each discrete location. Now it compares all groups across all discrete locations.
the problems list should be a vanilla List2 where we can insert groups rows:
import vanilla
class Demo:
def __init__(self):
self.w = vanilla.Window((300, 150))
items = [
vanilla.List2GroupRow("Discrete space: width weight italic 0"),
"A",
"B",
"C",
"D",
"E",
"F",
vanilla.List2GroupRow("Discrete space: width weight italic 1"),
"1",
"2",
"3",
"4",
"5",
"6",
"7"
]
self.w.list = vanilla.List2(
"auto",
items=items,
allowsGroupRows=True,
floatsGroupRows=True,
allowsSorting=False
)
rules = [
"H:|[list]|",
"V:|[list]|"
]
self.w.addAutoPosSizeRules(rules)
self.w.open()
Demo()```