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

Check request: verify font.sfntVersion against the presence of glyf and CFF/CFF2 #3388

Closed
justvanrossum opened this issue Jul 23, 2021 · 6 comments
Labels
New check proposal We expect new check proposals to include a detailed rationale description and a suggested check-id Severity 5 (Highest) Font problems that must be addressed urgently!
Milestone

Comments

@justvanrossum
Copy link
Contributor

It's possible to build fonts that have the wrong sfntVersion field, say a TTF with a glyf table, yet with an sfntVersion of "OTTO". Such fonts are rejected by FreeType.

See also: fonttools/fonttools#2370

(I just saw that ots already warns about this, so perhaps it's redundant for fontbakery.)

@justvanrossum
Copy link
Contributor Author

Although: ots only warns for it, for fontbakery it should be a FAIL IMO, as FreeType rejects such fonts.

@felipesanches felipesanches added the New check proposal We expect new check proposals to include a detailed rationale description and a suggested check-id label Jul 23, 2021
@felipesanches
Copy link
Collaborator

I just saw that ots already warns about this, so perhaps it's redundant for fontbakery.

In general we're happy to substitute 3rd party checks with our own fontbakery checks, specially if we're able to document them with more detailed rationale metadata.

@felipesanches felipesanches added this to the 0.8.x series milestone Jul 23, 2021
@felipesanches felipesanches added the Severity 5 (Highest) Font problems that must be addressed urgently! label Jul 23, 2021
@felipesanches
Copy link
Collaborator

Correct me if I'm wrong, please. I'm proposing to classify this as a maximum severity check as it seems the font is completely broken if it does not pass this check, right?

@justvanrossum
Copy link
Contributor Author

justvanrossum commented Jul 23, 2021

It depends: FreeType rejects a font with sfntVersion="OTTO" and a glyf table, but doesn't have a CFF or CFF2 table, but other font consumers may not have problems with it. I can't really judge, I'm not familiar enough with fontbakery's severity gradations.

@felipesanches
Copy link
Collaborator

I'm not familiar enough with fontbakery's severity gradations.

At this point they're still experimental. We're gradually coming up with a way to categorize checks by perceived severity, but this is still very much subjective.

@miguelsousa
Copy link
Contributor

@felipesanches please assign this to me, and add it to the 0.8.9 queue.

felipesanches pushed a commit that referenced this issue Jun 1, 2022
Added to the Universal profile.
Ensures the font has the proper sfntVersion value.
(issue #3388)
@felipesanches felipesanches modified the milestones: 0.8.x series, 0.8.9 Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New check proposal We expect new check proposals to include a detailed rationale description and a suggested check-id Severity 5 (Highest) Font problems that must be addressed urgently!
Projects
None yet
Development

No branches or pull requests

3 participants