diff --git a/Cargo.toml b/Cargo.toml index b13b6f77..a816e801 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,10 +11,10 @@ env_logger = "0.10.0" parking_lot = "0.12.1" -fea-rs = "0.12.0" +fea-rs = "0.13.0" font-types = { version = "0.3.3", features = ["serde"] } read-fonts = "0.10.0" -write-fonts = "0.13.0" +write-fonts = "0.14.0" skrifa = "0.9.0" bitflags = "2.0" diff --git a/fontbe/src/glyphs.rs b/fontbe/src/glyphs.rs index dc4c7113..fcdb4b61 100644 --- a/fontbe/src/glyphs.rs +++ b/fontbe/src/glyphs.rs @@ -309,11 +309,12 @@ impl Work for GlyphWork { .glyphs .set_unconditionally(Glyph::new_simple(name.clone(), base_glyph.clone())); - let mut contour_end = 0; + let mut num_points = 0; let mut contour_ends = Vec::with_capacity(base_glyph.contours().len()); for contour in base_glyph.contours() { - contour_end += contour.len(); - contour_ends.push(contour_end); + assert!(!contour.is_empty()); + num_points += contour.len(); + contour_ends.push(num_points - 1); } ( name,