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

The delta-set index mapping table: When are delta-set index mappings provided? #708

Closed
dejanyy opened this issue Dec 22, 2020 · 2 comments
Closed
Assignees
Milestone

Comments

@dejanyy
Copy link

dejanyy commented Dec 22, 2020

On this page:

https://docs.microsoft.com/en-us/typography/opentype/spec/hvar

under "Processing" The spec says:

Delta-set indices are obtained based on the glyph ID. If there is no delta-set index mapping table for advance widths, then glyph IDs implicitly provide the indices: for a given glyph ID, the delta-set outer-level index is zero, and the glyph ID is the delta-set inner-level index.

If delta-set index mappings are provided, the outer- and inner-level indices are combined in a packed format that uses one to four bytes for each mapping entry. Each mapping table provides information describing the packed format; this is used to extract the separate outer- and inner-level indices.

The first paragraph is rather unclear. What does it mean "if there is no delta-set index mapping table for advance widths"? Is this the situation when the offset to the delta-set index mapping table is invalid? When the mapCount is zero? Both? When the mapCount is invalid (e.g. larger than the number of glyphs)? Something else?

Then in the second paragraph the spec talks about "delta-set index mappings", which should be the entries (records) in the "delta-set index mapping table"? But the way it's worded, the specs seems to seems to suggest that "delta-set index mapping table" and "delta-set index mappings" are the same thing. Regardless of what the specs says or implies, the same questions can be asked: When are "delta-set index mappings" provided? When the offset to the delta-set index mapping table is valid? When the mapCount is positive? What if mapCount is invalid, e.g. larger than the number of glyphs? In this situation the "delta-set index mapping table" arel provided?

As you can see many questions can be asked but there is no clear and definitive answer.

I think this rather important situation needs to be described using a much more precise technical language, so it's 100% clear when glyph IDs implicitly provide the indices.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@PeterCon PeterCon self-assigned this Jan 20, 2021
@PeterCon
Copy link
Collaborator

What does it mean "if there is no delta-set index mapping table for advance widths"? Is this the situation when the offset to the delta-set index mapping table is invalid? When the mapCount is zero?

The only case in which there is no mapping table would be if the advanceWidthMappingOffset is null. If that offset is not NULL, then there is a mapping table.

For OT 1.9, some minor edits will be made.

@PeterCon PeterCon added this to the OpenType 1.9 milestone Oct 12, 2021
@PeterCon
Copy link
Collaborator

PeterCon commented Dec 9, 2021

Addressed in OpenType 1.9. Closing.

@PeterCon PeterCon closed this as completed Dec 9, 2021
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

2 participants