diff --git a/Cargo.toml b/Cargo.toml index de36d461..b13b6f77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,11 +11,11 @@ env_logger = "0.10.0" parking_lot = "0.12.1" -fea-rs = "0.10.0" +fea-rs = "0.12.0" font-types = { version = "0.3.3", features = ["serde"] } -read-fonts = "0.8.0" -write-fonts = "0.11.0" -skrifa = "0.7.0" +read-fonts = "0.10.0" +write-fonts = "0.13.0" +skrifa = "0.9.0" bitflags = "2.0" chrono = { version = "0.4.24", features = ["serde"] } diff --git a/fontbe/src/error.rs b/fontbe/src/error.rs index b5fb3017..c5457469 100644 --- a/fontbe/src/error.rs +++ b/fontbe/src/error.rs @@ -6,7 +6,7 @@ use fontdrasil::types::GlyphName; use fontir::variations::DeltaError; use read_fonts::ReadError; use thiserror::Error; -use write_fonts::tables::{glyf::BadKurbo, gvar::GvarInputError, variations::IupError}; +use write_fonts::tables::{glyf::MalformedPath, gvar::GvarInputError, variations::IupError}; #[derive(Debug, Error)] pub enum Error { @@ -19,7 +19,7 @@ pub enum Error { #[error("'{glyph_name}' {kurbo_problem:?} {context}")] KurboError { glyph_name: GlyphName, - kurbo_problem: BadKurbo, + kurbo_problem: MalformedPath, context: String, }, #[error("'{glyph}' references {referenced_glyph}, {problem}")] diff --git a/fontbe/src/font.rs b/fontbe/src/font.rs index 6931147b..2d85ee77 100644 --- a/fontbe/src/font.rs +++ b/fontbe/src/font.rs @@ -144,7 +144,7 @@ impl Work for FontWork { } debug!("Grabbing {tag} for final font"); let bytes = bytes_for(context, work_id.clone())?; - builder.add_table(*tag, bytes); + builder.add_raw(*tag, bytes); } debug!("Building font"); diff --git a/fontbe/src/glyphs.rs b/fontbe/src/glyphs.rs index d4649cec..c3d4570b 100644 --- a/fontbe/src/glyphs.rs +++ b/fontbe/src/glyphs.rs @@ -22,9 +22,7 @@ use read_fonts::{ }; use write_fonts::{ tables::{ - glyf::{ - simple_glyphs_from_kurbo, Bbox, Component, ComponentFlags, CompositeGlyph, SimpleGlyph, - }, + glyf::{Bbox, Component, ComponentFlags, CompositeGlyph, SimpleGlyph}, variations::iup_delta_optimize, }, OtRound, @@ -290,8 +288,8 @@ impl Work for GlyphWork { CheckedGlyph::Contour { name, paths } => { // Convert paths to SimpleGlyphs in parallel so we can get consistent point streams let (locations, bezpaths): (Vec<_>, Vec<_>) = paths.into_iter().unzip(); - let simple_glyphs = - simple_glyphs_from_kurbo(&bezpaths).map_err(|e| Error::KurboError { + let simple_glyphs = SimpleGlyph::interpolatable_glyphs_from_bezpaths(&bezpaths) + .map_err(|e| Error::KurboError { glyph_name: self.glyph_name.clone(), kurbo_problem: e, context: bezpaths diff --git a/fontbe/src/metrics_and_limits.rs b/fontbe/src/metrics_and_limits.rs index dedf9f74..c74ed310 100644 --- a/fontbe/src/metrics_and_limits.rs +++ b/fontbe/src/metrics_and_limits.rs @@ -381,7 +381,7 @@ mod tests { 0, &crate::orchestration::Glyph::Simple( "don't care".into(), - SimpleGlyph::from_kurbo( + SimpleGlyph::from_bezpath( &BezPath::from_svg("M-437,611 L-334,715 L-334,611 Z").unwrap(), ) .unwrap(),