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

[ttx_diff]: Normalize kern rules #670

Merged
merged 3 commits into from
Jan 18, 2024
Merged

[ttx_diff]: Normalize kern rules #670

merged 3 commits into from
Jan 18, 2024

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Dec 22, 2023

This adds the proper normalization logic for pairpos rules: basically we will now sum the values in subsequent lookups that apply to the same pairs.

this PR also involves moving some test helpers to a common test_helpers module, since they're needed by different tests that live in different places.

There's one question inline: basically I'm not sure how we should think about merging of device tables, or if we should care. Also I'm assuming that if deltas are provided there should be the same number of deltas in each master, and we can just sum them individually?

Comment on lines 246 to 248
// - if we have device tables we're just dropping the second, which
// is fine for our purposes? And if we have mixed deltas & devices than
// god help us
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is fine, I've actually never seen device tables in the wild. how about we at least warn?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can warn, but when we run with ttx_diff (which is the most common case) we suppress stderr so we might never see it. 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an internal tool, and we don't use device tables, so I'm just going to let this slide.

With this we will now combine any pairpos rules that apply to the same
glyph pair in different lookups into a single value, as would happen
with a shaper.
@cmyr cmyr added this pull request to the merge queue Jan 18, 2024
Merged via the queue into main with commit 668d176 Jan 18, 2024
10 checks passed
@cmyr cmyr deleted the normalize-kern branch January 18, 2024 18:44
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.

2 participants