drop kern pairs with mixed bidi type #361
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
... as kerning across direction runs doesn't work in current implementations.
Also, we can't guess the designer's intention as to the "true" direction of these kern pairs with mixed bidi. So for now we warn and prune them. Maybe revise once we'll have defined that new "visual" hkerning.plist.
PTAL @khaledhosny
Incidentally also this fixes #341 because it removes the chance that feaLib will produce two PairPos2 subtables with overlapping coverages.
The split occurs when, within the same FEA lookup block definition, there are mutliple pos rules with different value record format (format A is used for LTR kern pairs [modifying only XAdvance of first glyph], format B for RTL kern pairs[modifying both XAdvance and XPlacement]).
Instead of splitting, feaLib should fill with 0 the missing values then figure out a heuristic to store the matrix optimally (see fonttools/fonttools#1731).