Variable fonts often expose named instances (e.g. "Regular", "Bold", "Light Condensed"). harfrust supports ShaperInstance::from_named_instance(font, index) and ShaperInstance::set_named_instance(font, index), but our Font only exposes set_variations(...).
API:
font.set_named_instance(0)# apply named instance at index 0
Implementation parallels set_variations in src/font.rs:80 — direct field access on &self.data + &mut self.instance, dispatch on whether instance is Some.
Out of scope: enumerating available named instances (would require exposing the fvar table). Add only if asked.
Variable fonts often expose named instances (e.g. "Regular", "Bold", "Light Condensed"). harfrust supports
ShaperInstance::from_named_instance(font, index)andShaperInstance::set_named_instance(font, index), but ourFontonly exposesset_variations(...).API:
Implementation parallels set_variations in src/font.rs:80 — direct field access on &self.data + &mut self.instance, dispatch on whether instance is Some.
Out of scope: enumerating available named instances (would require exposing the fvar table). Add only if asked.