Skip to content

Commit

Permalink
add noop axis to repro MissingAxisTentError #426
Browse files Browse the repository at this point in the history
  • Loading branch information
anthrotype committed Sep 5, 2023
1 parent 23ce03f commit 6560166
Showing 1 changed file with 29 additions and 17 deletions.
46 changes: 29 additions & 17 deletions fontbe/src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,23 +618,35 @@ mod tests {
StaticMetadata::new(
1024,
Default::default(),
vec![Axis {
name: "Weight".to_string(),
tag: Tag::new(b"wght"),
min: min_wght_user,
default: def_wght_user,
max: max_wght_user,
hidden: false,
converter: CoordConverter::new(
vec![
// the design values don't really matter
(min_wght_user, DesignCoord::new(0.0)),
(def_wght_user, DesignCoord::new(1.0)),
(max_wght_user, DesignCoord::new(2.0)),
],
1,
),
}],
vec![
Axis {
name: "Weight".to_string(),
tag: Tag::new(b"wght"),
min: min_wght_user,
default: def_wght_user,
max: max_wght_user,
hidden: false,
converter: CoordConverter::new(
vec![
// the design values don't really matter
(min_wght_user, DesignCoord::new(0.0)),
(def_wght_user, DesignCoord::new(1.0)),
(max_wght_user, DesignCoord::new(2.0)),
],
1,
),
},
// no-op 'point' axis, should be ignored
Axis {
name: "Width".to_string(),
tag: Tag::new(b"wdth"),
min: UserCoord::new(0.0),
default: UserCoord::new(0.0),
max: UserCoord::new(0.0),
hidden: false,
converter: CoordConverter::new(vec![], 0),
},
],
Default::default(),
HashSet::from([min_wght, def_wght, max_wght]),
)
Expand Down

0 comments on commit 6560166

Please sign in to comment.