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

Don't crash when there are only base-mark kerns #569

Merged
merged 3 commits into from Dec 15, 2021
Merged

Conversation

simoncozens
Copy link
Contributor

ufo2ft's kernFeatureWriter splits base-to-base and mark-to-base kerns like this:

basePairs, markPairs = self._splitBaseAndMarkPairs(pairs, marks)
lookups["LTR"] = [self._makeKerningLookup("kern_ltr", basePairs)]
if markPairs:
lookups["LTR"].append(

There's a horrible corner case (which I've just hit!) if the only kerns in the font are between bases and marks: basePairs is empty and the assertion here fails:

def _makeKerningLookup(
self, name, pairs, exclude=None, rtl=False, ignoreMarks=True
):
assert pairs

This fixes that.

@simoncozens simoncozens merged commit 42aa55a into main Dec 15, 2021
@khaledhosny khaledhosny deleted the only-mark-kerning branch December 15, 2021 23:53
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.

None yet

2 participants