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

[layout-normalizer] skip if GPOS not present #630

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

anthrotype
Copy link
Member

the table is optional. Fixes #628

let table = font
.gpos()
.map_err(|_| Error::MissingTable(Tag::new(b"GPOS")))?;
let Some(table) = font.gpos().ok() else {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I think you can match so w/o .ok()?
Nit2: Arguably we should fail on any error except there is no GPOS table whereas we are assuming here the only error possible is missing. That's a problem before and after so I wouldn't block on it.

@anthrotype anthrotype added this pull request to the merge queue Dec 6, 2023
Merged via the queue into main with commit 23e689a Dec 6, 2023
10 checks passed
@anthrotype anthrotype deleted the layout-normalizer-optional-gpos branch December 6, 2023 19:49
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.

Absence of a layout table fails ttx_diff
2 participants