diff --git a/Doc/source/designspaceLib/v5_class_diagram.png b/Doc/source/designspaceLib/v5_class_diagram.png index 7c75bcb92..38bcf376a 100644 Binary files a/Doc/source/designspaceLib/v5_class_diagram.png and b/Doc/source/designspaceLib/v5_class_diagram.png differ diff --git a/Doc/source/designspaceLib/v5_class_diagram.puml b/Doc/source/designspaceLib/v5_class_diagram.puml index 31f9e9c36..1cc008225 100644 --- a/Doc/source/designspaceLib/v5_class_diagram.puml +++ b/Doc/source/designspaceLib/v5_class_diagram.puml @@ -112,7 +112,7 @@ class Source { + path: str + layerName: Optional[str] + <> location: Location -+ <> designLocation: AnisotropicLocation ++ <> designLocation: SimpleLocation .... + font: Optional[Font] .... diff --git a/Lib/fontTools/designspaceLib/__init__.py b/Lib/fontTools/designspaceLib/__init__.py index 1c71fd002..69d4912c0 100644 --- a/Lib/fontTools/designspaceLib/__init__.py +++ b/Lib/fontTools/designspaceLib/__init__.py @@ -312,7 +312,7 @@ class SourceDescriptor(SimpleDescriptor): return self.designLocation @location.setter - def location(self, location: Optional[AnisotropicLocationDict]): + def location(self, location: Optional[SimpleLocationDict]): self.designLocation = location or {} def setFamilyName(self, familyName, languageCode="en"): @@ -329,15 +329,13 @@ class SourceDescriptor(SimpleDescriptor): """ return self.localisedFamilyName.get(languageCode) - def getFullDesignLocation( - self, doc: "DesignSpaceDocument" - ) -> AnisotropicLocationDict: + def getFullDesignLocation(self, doc: "DesignSpaceDocument") -> SimpleLocationDict: """Get the complete design location of this source, from its :attr:`designLocation` and the document's axis defaults. .. versionadded:: 5.0 """ - result: AnisotropicLocationDict = {} + result: SimpleLocationDict = {} for axis in doc.axes: if axis.name in self.designLocation: result[axis.name] = self.designLocation[axis.name]