Skip to content

Commit

Permalink
Update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
RazrFalcon committed Aug 10, 2024
1 parent 546df09 commit d8c8780
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 66 deletions.
100 changes: 57 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions crates/usvg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ xmlwriter = "0.1"
# parser
data-url = "0.3" # for href parsing
flate2 = { version = "1.0", default-features = false, features = ["rust_backend"] } # SVGZ decoding
imagesize = "0.12" # raster images size detection
imagesize = "0.13" # raster images size detection
kurbo = "0.11" # Bezier curves utils
roxmltree = "0.20"
simplecss = "0.2"
siphasher = "1.0" # perfect hash implementation

# text
fontdb = { version = "0.18.0", default-features = false, optional = true }
rustybuzz = { version = "0.14.0", optional = true }
fontdb = { version = "0.21.0", default-features = false, optional = true }
rustybuzz = { version = "0.18.0", optional = true }
unicode-bidi = { version = "0.3", optional = true }
unicode-script = { version = "0.5", optional = true }
unicode-vo = { version = "0.1", optional = true }
Expand Down
20 changes: 0 additions & 20 deletions crates/usvg/src/text/colr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,26 +296,6 @@ impl<'a> ttf_parser::colr::Painter<'a> for GlyphPainter<'a> {
self.svg.end_element(); // g
}

fn push_translate(&mut self, tx: f32, ty: f32) {
self.push_transform(ttf_parser::Transform::new(1.0, 0.0, 0.0, 1.0, tx, ty));
}

fn push_scale(&mut self, sx: f32, sy: f32) {
self.push_transform(ttf_parser::Transform::new(sx, 0.0, 0.0, sy, 0.0, 0.0));
}

fn push_rotate(&mut self, angle: f32) {
let cc = (angle * std::f32::consts::PI).cos();
let ss = (angle * std::f32::consts::PI).sin();
self.push_transform(ttf_parser::Transform::new(cc, ss, -ss, cc, 0.0, 0.0));
}

fn push_skew(&mut self, skew_x: f32, skew_y: f32) {
let x = (-skew_x * std::f32::consts::PI).tan();
let y = (skew_y * std::f32::consts::PI).tan();
self.push_transform(ttf_parser::Transform::new(1.0, y, x, 1.0, 0.0, 0.0));
}

fn push_transform(&mut self, transform: ttf_parser::Transform) {
self.transforms_stack.push(self.transform);
self.transform = ttf_parser::Transform::combine(self.transform, transform);
Expand Down

0 comments on commit d8c8780

Please sign in to comment.