Last active
June 17, 2025 14:49
-
-
Save connordavenport/e9469d0870e64903591045bec63f88ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import more_itertools | |
def _as_list(item): | |
return list(more_itertools.always_iterable(item)) | |
def _get_designspaces(self) -> list[str]: | |
return _as_list(self.lib.get('public.designspaces', [])) | |
def _set_designspaces(self, new_designspace:str | list[str]): | |
self.lib['public.designspaces'] = _as_list(new_designspaces) | |
_designspaces = property(_get_designspaces, _set_designspaces) | |
from mojo.roboFont import RFont | |
RFont.designspaces = _designspaces | |
RFont.designspace = _designspaces |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment