diff --git a/src/fontra/backends/fontra.py b/src/fontra/backends/fontra.py index d6333e945..3509934ae 100644 --- a/src/fontra/backends/fontra.py +++ b/src/fontra/backends/fontra.py @@ -96,10 +96,10 @@ async def putGlobalAxes(self, axes): self._scheduler.schedule(self._writeFontData) async def getFontLib(self): - return deepcopy(self.fontData.lib) + return deepcopy(self.fontData.customData) - async def putFontLib(self, lib): - self.fontData.lib = deepcopy(lib) + async def putFontLib(self, customData): + self.fontData.customData = deepcopy(customData) self._scheduler.schedule(self._writeFontData) def _readGlyphInfo(self): diff --git a/src/fontra/client/core/classes.json b/src/fontra/client/core/classes.json index 2984f96c2..ef5436b18 100644 --- a/src/fontra/client/core/classes.json +++ b/src/fontra/client/core/classes.json @@ -11,6 +11,10 @@ "type": "dict", "subtype": "list" }, + "customData": { + "type": "dict", + "subtype": "Any" + }, "axes": { "type": "list", "subtype": "GlobalAxis" diff --git a/src/fontra/core/classes.py b/src/fontra/core/classes.py index 95edeec92..4d6eb187e 100644 --- a/src/fontra/core/classes.py +++ b/src/fontra/core/classes.py @@ -129,7 +129,7 @@ class Font: unitsPerEm: int = 1000 glyphs: GlyphSet = field(default_factory=GlyphSet) glyphMap: GlyphMap = field(default_factory=GlyphMap) - lib: dict = field(default_factory=dict) + customData: CustomData = field(default_factory=CustomData) axes: list[Union[GlobalAxis, GlobalDiscreteAxis]] = field(default_factory=list) def _trackAssignedAttributeNames(self): diff --git a/test-common/fonts/MutatorSans.fontra/font-data.json b/test-common/fonts/MutatorSans.fontra/font-data.json index b32c77e14..80631efbd 100644 --- a/test-common/fonts/MutatorSans.fontra/font-data.json +++ b/test-common/fonts/MutatorSans.fontra/font-data.json @@ -1,6 +1,6 @@ { "unitsPerEm": 1000, -"lib": {}, +"customData": {}, "axes": [ { "name": "width",