From f4148f42e93f13a7da13b29f22be64905c720594 Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Fri, 17 May 2024 21:44:40 +0200 Subject: [PATCH] Ensure sources use dense locations after adding axes --- src/fontra/backends/designspace.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fontra/backends/designspace.py b/src/fontra/backends/designspace.py index 6a738dfe9..f49ed3e19 100644 --- a/src/fontra/backends/designspace.py +++ b/src/fontra/backends/designspace.py @@ -710,8 +710,8 @@ async def putAxes(self, axes): outputLocation=mapping.outputLocation, ) - self._writeDesignSpaceDocument() self.updateAxisInfo() + self._writeDesignSpaceDocument() self.loadUFOLayers() async def getSources(self) -> dict[str, FontSource]: @@ -777,6 +777,8 @@ async def putCustomData(self, lib): def _writeDesignSpaceDocument(self): self.dsDoc.write(self.dsDoc.path) + for source in self.dsDoc.sources: + source.location = {**self.defaultLocation, **source.location} self.dsDocModTime = os.stat(self.dsDoc.path).st_mtime async def watchExternalChanges(