diff --git a/Lib/defconAppKit/controls/fontInfoView.py b/Lib/defconAppKit/controls/fontInfoView.py index 2c8d4a4..46650e0 100644 --- a/Lib/defconAppKit/controls/fontInfoView.py +++ b/Lib/defconAppKit/controls/fontInfoView.py @@ -2715,7 +2715,6 @@ def woffMetadataDirectionToUFO(value): hasDefault=False ) - # WOFF Credits def woffMetadataCreditsFromUFO(value): @@ -3207,6 +3206,13 @@ def woffMetadataGenericTextItemFactory(title=""): ] +controlRequiredPrototypes = { + "woffMetadataDescription": {"text": [{'text': 'Text'}]}, + "woffMetadataVendor": {"name": ""}, + "woffMetadataLicensee": {"name": ""}, +} + + # Attribute Getting and Setting def getAttributeValue(info, attr): @@ -3236,7 +3242,7 @@ def setAttributeValue(info, attr, value): keys = keys[1:] d = getattr(info, attr) if d is None: - d = {} + d = deepcopy(controlRequiredPrototypes.get(attr, {})) for key in keys[:-1]: if key not in d: d[key] = {}