Skip to content

Conversation

@simoncozens
Copy link
Contributor

This adds a new MultiItemVariationStoreBuilder (abstracting out common functionality between it and the VariationStoreBuilder), and implements write-fonts support for the VARC table.

The varc.rs tests provide some examples of how to use this to build VARC tables.

pub condition_index: Option<VarcVariationIndex>,
pub axis_values: Option<BTreeMap<u16, f32>>,
pub axis_values_var_index: Option<VarcVariationIndex>,
pub transform: DecomposedTransform,
Copy link
Contributor

Choose a reason for hiding this comment

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

It came as a surprise to me that DecomposedTransform has optional fields. Maybe the name should reflect that?

@behdad
Copy link
Contributor

behdad commented Jan 19, 2026

This looks great to me! Thanks for working on it.

@simoncozens
Copy link
Contributor Author

One thing to mention is that this is the least intrusive approach. Because of that, we construct a bunch of Index2 during compilation, which erases the structural information. A more comprehensive approach would be to introduce Index2<T> as its own array type (possibly by allowing extern records in the codegen to take generics, and then manually implementing them). But also YAGNI.

Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

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

A few little notes inline but overall this looks excellent, thanks!

@simoncozens simoncozens merged commit 9675bad into main Jan 21, 2026
13 checks passed
@simoncozens simoncozens deleted the write-varc branch January 21, 2026 15:52
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.

4 participants