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

Add trait for remapping temporary delta set index ids to their final values #719

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Nov 23, 2023

I'm currently reworking the fea-rs API so that it has native types for variable ValueRecords and AnchorTables, which will let actually create the various lookup builders for marks & kerning before feature generation.

Previously fea-rs used the native write-fonts types for value records, and it was responsible for remapping the temporary indices before generating the final lookups. Now it converts to the native types later in the process, and it makes sense to just have a mechanism for walking all the lookups and remapping everything there.

@@ -42,6 +42,20 @@ pub struct VariationIndexRemapping {
map: HashMap<TemporaryDeltaSetId, VariationIndex>,
}

/// Remapping temporary delta set identifies to the final values.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Remapping temporary delta set identifies to the final values.
/// Remapping temporary delta set identifiers to the final values.

cmyr added 2 commits November 27, 2023 15:08
After compiling an ItemVariationStore, we need to remap any existing
indices into that structure, in any place that they exist.

This trait encapsulates that behaviour.

It is currently only implemented by GPOS, but only because I'm not very
familiar with its use elsewhere, and I want to make sure this works.
@cmyr cmyr force-pushed the delta-index-remapping branch from bfc5cf9 to 8c7debd Compare November 27, 2023 20:27
@cmyr cmyr merged commit 35d82ab into main Nov 27, 2023
9 checks passed
@cmyr cmyr deleted the delta-index-remapping branch November 27, 2023 21:41
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

Successfully merging this pull request may close these issues.

2 participants