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

Undocumented pair pos syntax? #1757

Open
cmyr opened this issue Oct 3, 2024 · 4 comments
Open

Undocumented pair pos syntax? #1757

cmyr opened this issue Oct 3, 2024 · 4 comments

Comments

@cmyr
Copy link

cmyr commented Oct 3, 2024

According to the spec (6.b.i. Specific and class pair kerning) GPOS pair positioning rules can be expressed as either,

# format A
position <glyph|glyphclass> <valuerecord> <glyph|glyphclass> <valuerecord>;

# or format B
position <glyph|glyphclass> <glyph|glyphclass> <valuerecord>;

but it looks like the compiler will also accept,

position <glyph|glyphclass> <valuerecord> <glyph|glyphclass>;

which compiles identically to format B.

Semantically this feels like "format A with an implicitly NULL second value record", and that's reasonable if redundant, but the docs should be updated to reflect that this is allowed, if it is supposed to be allowed?

@frankrolf
Copy link
Member

frankrolf commented Oct 3, 2024

The context of a GPOS pair can be more than two items – e.g. https://github.com/adobe-fonts/source-serif/blob/main/Roman/Instances/Text/Regular/kern_ctxt.fea

Maybe this makes more sense in that context?

@anthrotype
Copy link
Member

I don't think Colin is referring to contextual positioning. This is simple (non contextual) GPOS pair positioning in which the second valuerecord gets omitted (impliclitly NULL).

@frankrolf
Copy link
Member

FWIW, every kerning pair is contextual – unless you adjust a single glyph.

@cmyr
Copy link
Author

cmyr commented Oct 3, 2024

Yes this issue is not about the syntax for inline contexual rules, such as in your example; I'm referring specifically to the section of the spec dealing with GPOS Type 2 lookups. (I'll update the original issue to clarify this, thanks)

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

No branches or pull requests

3 participants