Skip to content

Commit

Permalink
Adjust for upstream API change and rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoolean committed Feb 12, 2025
1 parent 2cac39e commit 2b41755
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions fontbe/src/gvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl Work<Context, AnyWorkId, Error> for GvarWork {
mod tests {
use fontir::ir::GlyphOrder;
use write_fonts::{
tables::gvar::{AxisCoordinates, GlyphDelta, GlyphDeltas},
tables::gvar::{self, GlyphDelta, GlyphDeltas},
types::F2Dot14,
};

Expand All @@ -107,7 +107,7 @@ mod tests {
v if v == glyph_without_var => Vec::new(),
// At the maximum extent (normalized pos 1.0) of our axis, add +1, +1
v if v == glyph_with_var => vec![GlyphDeltas::new(
vec![AxisCoordinates::new(F2Dot14::from_f32(1.0), None)],
vec![gvar::Tent::new(F2Dot14::from_f32(1.0), None)],
vec![GlyphDelta::new(1, 1, false)],
)],
v => panic!("unexpected {v}"),
Expand Down
7 changes: 2 additions & 5 deletions fontir/src/variations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,13 +677,10 @@ impl From<(f64, f64, f64)> for Tent {
}
}

impl From<Tent> for gvar::AxisCoordinates {
impl From<Tent> for gvar::Tent {
fn from(val: Tent) -> Self {
let Tent { peak, min, max } = val;
gvar::AxisCoordinates::new(
peak.into(),
Some(gvar::Intermediate::explicit(min.into(), max.into())),
)
gvar::Tent::new(peak.into(), Some((min.into(), max.into())))
}
}

Expand Down

0 comments on commit 2b41755

Please sign in to comment.