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

Fix subsetting CID fonts with no subrs #132

Merged
merged 1 commit into from
Oct 8, 2017
Merged

Fix subsetting CID fonts with no subrs #132

merged 1 commit into from
Oct 8, 2017

Conversation

kblomster
Copy link
Contributor

Attempting to subset a CID-keyed CFF font with no subrs triggers a TypeError in CFFSubset.js because subsetSubrs() attempts to check the .length of null. This PR addresses that by not attempting to subset subrs at all if they do not exist in the font.

Fixes issue #42 (well, kinda but not really, the original issue that concerns is long gone but I found a related problem that should have been in a new issue). I didn't come up with this fix, credits go to @jahewson for pointing it out.

@devongovett devongovett merged commit e2ff84e into foliojs:master Oct 8, 2017
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