Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate instance values for com.typemytype.robofont.italicSlantOffset #59 #61

Merged
merged 5 commits into from
Aug 14, 2024

Conversation

LettError
Copy link
Owner

Create a mutator for values in com.typemytype.robofont.italicSlantOffset. Calculate the value when making an instance UFO.

  • getItalicSlantOffsetMutator() collects the values from the relevant sources.
  • only add the value to the instance UFO lib if it is not zero. Not entirely sure about this, but it seems cleaner?
  • Lib values added to the ds5 test fonts.

Create a mutator for values in com.typemytype.robofont.italicSlantOffset.
Calculate the value when making an instance UFO.
+ getItalicSlantOffsetMutator() collects the values from the relevant sources.
+ only add the value to the instance UFO lib if it is not zero. Not entirely sure about this, but it seems cleaner?
+ Lib values added to the ds5 test fonts.
All lib keys added to self.libKeysForProcessing will be calculated. self.italicSlantOffsetLibKey is added by default, but the operator's operator could add keys before generating the instances.
+ Currently this assumes default 0 for such a value if there is no entry in the lib. That's probably something to reconsider. It's hard to do any checks on these values because the code doesn't know them.
Add debug output for libMath processing.
Add testLibMathKey to the tests.
@LettError
Copy link
Owner Author

This will look for lib keys in doc.libKeysForProcessing and try to process them. italicSlantOffset is preloaded to the list. The test data has an extra key and values added and the values appear in the instances.

If we can't find any lib key values in any of the sources: don't make a mutator.
Also, if one source does not have a particular libkey, ignore the source. Don't make assumptions about the value. (was: assume 0)
Remove a print.
@LettError LettError merged commit 085c892 into master Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant