Skip to content

Commit c1605f0

Browse files
committed
Once again for the ufo2 branch, so RoboFont can get the update
1 parent 5e6c6d9 commit c1605f0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/defconAppKit/controls/openTypeControlsView.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def __init__(self, posSize, callback):
6363
self._dynamicTop = top
6464
self._gsubAttributes = {}
6565
self._gposAttributes = {}
66+
self._featureNames = {}
6667

6768
def _breakCycles(self):
6869
self._callback = None
@@ -95,6 +96,8 @@ def setFont(self, font):
9596
# teardown existing controls
9697
for attr in self._gsubAttributes.keys() + self._gposAttributes.keys():
9798
delattr(self._controlGroup, attr)
99+
for attr in self._featureNames.keys():
100+
delattr(self._controlGroup, attr)
98101
if hasattr(self._controlGroup, "gposTitle"):
99102
del self._controlGroup.gposTitle
100103
if hasattr(self._controlGroup, "gsubTitle"):
@@ -114,6 +117,7 @@ def setFont(self, font):
114117
else:
115118
gsubFeatureList = gsub.getFeatureList()
116119
self._gsubAttributes = {}
120+
self._featureNames = {}
117121
if gsubFeatureList:
118122
self._controlGroup.gsubTitle = vanilla.TextBox((10, top, -10, 14),
119123
NSAttributedString.alloc().initWithString_attributes_("GSUB", titleControlAttributes), sizeStyle="small")
@@ -131,6 +135,7 @@ def setFont(self, font):
131135
setName = stylisticSetNames[tag]
132136
obj = vanilla.TextBox((26, top, -10, 13), setName, sizeStyle="mini")
133137
setattr(self._controlGroup, attr, obj)
138+
self._featureNames[attr] = setName
134139
top += 13
135140
top += 10
136141
# GPOS

0 commit comments

Comments
 (0)