diff --git a/write-fonts/Cargo.toml b/write-fonts/Cargo.toml index 387846ed1..ff35db335 100644 --- a/write-fonts/Cargo.toml +++ b/write-fonts/Cargo.toml @@ -17,7 +17,7 @@ serde = ["dep:serde", "font-types/serde", "read-fonts/serde"] font-types = { version = "0.4.0", path = "../font-types" } read-fonts = { version = "0.11.2", path = "../read-fonts" } log = "0.4" -kurbo = "0.9.4" +kurbo = "0.10.2" dot2 = { version = "1.0", optional = true } serde = { version = "1.0", features = ["derive"], optional = true } indexmap = "2.0" diff --git a/write-fonts/src/tables/glyf/simple.rs b/write-fonts/src/tables/glyf/simple.rs index 26114d8f7..add597047 100644 --- a/write-fonts/src/tables/glyf/simple.rs +++ b/write-fonts/src/tables/glyf/simple.rs @@ -2,7 +2,6 @@ use crate::{ from_obj::{FromObjRef, FromTableRef, ToOwnedTable}, - pens::{self, ControlBoundsPen}, util::{self, MultiZip, WrappingGet}, FontWrite, OtRound, }; @@ -572,10 +571,8 @@ fn simple_glyphs_from_kurbo(paths: &[BezPath]) -> Result, Malfo for (contours, path) in glyph_contours.into_iter().zip(paths.iter()) { // https://github.com/googlefonts/fontmake-rs/issues/285 we want control point box, not tight bbox // so don't call path.bounding_box - let mut cbox_pen = ControlBoundsPen::new(); - pens::write_to_pen(path, &mut cbox_pen); glyphs.push(SimpleGlyph { - bbox: cbox_pen.bounds().unwrap_or_default().into(), + bbox: path.control_box().into(), contours, _instructions: Default::default(), })