Skip to content

Commit

Permalink
Make rules processing attribute optional
Browse files Browse the repository at this point in the history
  • Loading branch information
madig committed Aug 24, 2023
1 parent b142add commit 3088552
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/designspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub struct AxisMapping {
pub struct Rules {
/// Indicates whether substitution rules should be applied before or after
/// other glyph substitution features.
#[serde(rename = "@processing")]
#[serde(default, rename = "@processing")]
pub processing: RuleProcessing,
/// The rules.
#[serde(default, rename = "rule")]
Expand Down
8 changes: 8 additions & 0 deletions testdata/wght.designspace
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
<axes>
<axis tag="wght" name="Weight" minimum="400" maximum="700" default="400"/>
</axes>
<rules>
<rule>
<conditionset>
<condition name="Weight"/>
</conditionset>
<sub name="I" with="I.narrow"/>
</rule>
</rules>
<sources>
<source filename="TestFamily-Regular.ufo" name="Test Family Regular" familyname="Test Family" stylename="Regular">
<lib copy="1"/>
Expand Down

0 comments on commit 3088552

Please sign in to comment.