-
Notifications
You must be signed in to change notification settings - Fork 0
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
Obtain designspace mappings from avar2 data #25
Comments
The logic is actually pretty simple:
|
See this comment for how that logic can fail: |
Thanks for the discussion. Indeed the corners definitely need to be considered for representation as mappings. Trying now with this logic:
|
It seems to work well on arbitrary mappings on a 2-axis font, except for adding some redundant pin mappings. Amstelvar seems not to be working however. |
@behdad @justvanrossum if you care to take a look, the code is here. Lines 709 to 779 in 82d5727
|
The Fontra link is outdated now? |
Yes, since we’re agreed that a tent’s start and end need to be accounted for, as well as peak. |
Looks about right, except that part about getting delta from first ivsd? |
I actually don't fully understand that comment. |
Ah, that’s an old comment. It does handle multiple IVDs. I’ll delete. |
Hang on, there is a bug there (the [0] index at the end), which will affect IVDs after the 0th one. On it… |
Now uses [ivdIndex] instead of [0]. |
Currently Fencer ignores any existing avar data, though it would be very useful if it could visualize existing avar1 and avar2 data as mappings.
Although a general solution may not be possible, it should be possible at least in all the cases where the avar2 table was compiled from mappings, which includes all fonts made via a .designspace document and all fonts exported from Fencer.
This code from Fontra is suggested by @justvanrossum, as noted in fonttools/fonttools#3086
https://github.com/googlefonts/fontra/blob/087fac4c01d5bbd918f3550d03fae5693f0dc292/src/fontra/backends/opentype.py#L255-L285
The text was updated successfully, but these errors were encountered: