Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
THIS IS A DRAFT ONLY, SEE BELOW!
Motivation and Context
Based on #486 adding read support, I thought I could implement writing support for LookupType 7 (Extension Substitution).
However it seems I'm way out of my comfort zone and stuck on finding the right approach to this.
What I've done so far is adding a subtableMaker for ExtensionSubstFormat1 tables and returning the extension as a new table to append after all the other subtables.
However, I'm not sure if the extensions are appended in the correct location (the spec is not clear on where they are supposed to be located - after the LookupList? Or at the end of the GSUB table? -, or at least I don't understand it) and how to replace the offset value in the corresponding extension substitution table afterwards. I tried to do it similar to the subsitution table offsets, but I wasn't able to figure it out and gave up.
Maybe this is still a good starting point for someone more clever than me to implement this.