Skip to content

Commit

Permalink
Update fontations/fea-rs
Browse files Browse the repository at this point in the history
This includes a small number of fixes to work around changes in the
upstream API.
  • Loading branch information
cmyr committed Aug 8, 2023
1 parent eadadb7 commit 8737a09
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
4 changes: 2 additions & 2 deletions fontbe/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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}")]
Expand Down
2 changes: 1 addition & 1 deletion fontbe/src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl Work<Context, AnyWorkId, Error> 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");
Expand Down
8 changes: 3 additions & 5 deletions fontbe/src/glyphs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -290,8 +288,8 @@ impl Work<Context, AnyWorkId, Error> 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
Expand Down
2 changes: 1 addition & 1 deletion fontbe/src/metrics_and_limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 8737a09

Please sign in to comment.