LettError / designSpaceRoboFontExtension

A RoboFont extension for creating and editing designspace documents.
MIT License
29 stars 6 forks source link

Anisotropic Instances #55

Closed connordavenport closed 11 months ago

connordavenport commented 1 year ago

Hey! I have been playing around with DSE2 a lot recently and noticed that there are some issues with viewing the instances in the instancePreview. This is the most recent version on the branch. Here is the traceback:

Traceback (most recent call last):
  File "lib/doodleDelegate.pyc", line 88, in sendEvent_
  File "/Applications/RoboFont_444b.app/Contents/Resources/lib/python3.9/vanilla/vanillaBase.py", line 520, in action_
  File "/Users/connordavenport/Library/Application Support/RoboFont/plugins/DesignspaceEditor2.roboFontExt/lib/designspaceEditor/ui.py", line 1104, in instancesEditorPreviewToolsCallback
  File "/Applications/RoboFont_444b.app/Contents/Resources/lib/python3.9/mojo/subscriber.py", line 1454, in __init__
  File "/Users/connordavenport/Library/Application Support/RoboFont/plugins/DesignspaceEditor2.roboFontExt/lib/designspaceEditor/instancesPreview.py", line 20, in build
  File "/Applications/RoboFont_444b.app/Contents/Resources/lib/python3.9/ufoProcessor/varModels.py", line 116, in makeInstance
  File "/Applications/RoboFont_444b.app/Contents/Resources/lib/python3.9/ufoProcessor/varModels.py", line 120, in _normalize
  File "/Applications/RoboFont_444b.app/Contents/Resources/lib/python3.9/fontTools/varLib/models.py", line 119, in normalizeLocation
  File "/Applications/RoboFont_444b.app/Contents/Resources/lib/python3.9/fontTools/varLib/models.py", line 63, in normalizeValue
TypeError: '<' not supported between instances of 'float' and 'tuple'
typemytype commented 1 year ago

Anisotropic instances will indeed not work.. they are not supported in the OT spec

Anisotropic instances are handy to have them around in a work-in-progress-while-designing designspace file, but not a designspace file where the intent is to generate variable font out of it.

maybe DSE should warn that this is not possible...

LettError commented 1 year ago

Instancepreview can show anisotropic. Can you share a designsoace?

typemytype commented 1 year ago

oh was confusing with the "Labels Preview"

connordavenport commented 1 year ago

Yes, I will send you one privately. I noticed the issues with Mutator Sans as well.

typemytype commented 1 year ago

switching to mutatorMath for the instance preview helps...

still dont know if varLib fully supports anisotropic locations

typemytype commented 1 year ago

should be solved in 7989cf9 by using mutatorMath for the instance previewer

LettError commented 1 year ago

@connordavenport can you see if your issue is resolved?

typemytype commented 11 months ago

this is solved along the way