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

A null offset is a valid value #172

Open
behdad opened this issue May 8, 2018 · 6 comments
Open

A null offset is a valid value #172

behdad opened this issue May 8, 2018 · 6 comments

Comments

@behdad
Copy link
Collaborator

behdad commented May 8, 2018

In the fonttools subsetter I made it output null offset if a Coverage table is empty in MarkGlyphSets in GDEF. But ots fails on that.

Null offsets are perfectly fine according to the spec, and all implementations accept them. Yet another OTS stupidity :(.

ERROR: GDEF: Bad coverage location 0 for mark set 0
ERROR: GDEF: Invalid mark glyph sets
ERROR: GDEF: Failed to parse table
Failed to sanitise file!
behdad added a commit to fonttools/fonttools that referenced this issue May 8, 2018
@khaledhosny
Copy link
Owner

Do you have a test font (or how can I make one)?

@khaledhosny khaledhosny added the bug label May 9, 2018
@behdad
Copy link
Collaborator Author

behdad commented May 10, 2018

@nyshadhr9 can you please provide this?

@simoncozens
Copy link

This (or something similar) also happens on attempting to sanitise Noto Sans VF's mark-to-ligature lookups.
https://notofonts.github.io/latin-greek-cyrillic/fonts/NotoSans/full/slim-variable-ttf/NotoSans[wght].ttf is an example.

@jfkthame
Copy link
Collaborator

In the fonttools subsetter I made it output null offset if a Coverage table is empty in MarkGlyphSets in GDEF. But ots fails on that.

Null offsets are perfectly fine according to the spec,

I'm not sure this is true.... where does the spec say this? It's not mentioned at https://learn.microsoft.com/en-gb/typography/opentype/spec/gdef#mark-glyph-sets-table, AFAICS.

(Note that MicrosoftDocs/typography-issues#828 (comment) and following comments seem to state the opposite, unless the specific field is explicitly documented as allowing null.)

@behdad
Copy link
Collaborator Author

behdad commented May 25, 2023

Fair.

Let's look at it from this angle: All major implementations allow this.

@jfkthame
Copy link
Collaborator

That may well be so -- I haven't attempted to check. But Peter's comment at MicrosoftDocs/typography-issues#828 (comment) said:

Today, we have to assume that some implementations expect non-NULL offsets to these coverage tables (and, in fact, such do exist)

though I don't know what specific implementations he was referring to.

cc @PeterCon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants