From 59b57b0ebe554b9f90c3ff7aaed2f8b4b4edd428 Mon Sep 17 00:00:00 2001 From: Yevhenii Reizner Date: Sat, 22 Oct 2022 19:25:14 +0300 Subject: [PATCH] Bump dependencies. --- CHANGELOG.md | 1 + Cargo.lock | 17 ++++++++--------- usvg/Cargo.toml | 6 ++---- usvg/src/text/fontdb_ext.rs | 8 +++++--- usvg/src/text/shaper.rs | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac755c6cf..7f3fe043d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This changelog also contains important changes in dependencies. ### Added - CSS3 `writing-mode` variants `vertical-rl` and `vertical-lr`. Thanks to [yisibl](https://github.com/yisibl). +- (tiny-skia) AArch64 Neon SIMD support. Up to 3x faster on Apple M1. ### Changed - `usvg::Tree` stores only `Group`, `Path` and `Image` nodes now. diff --git a/Cargo.lock b/Cargo.lock index b358d5f2f..a37a02147 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -92,9 +92,9 @@ dependencies = [ [[package]] name = "fontdb" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122fa73a5566372f9df09768a16e8e3dad7ad18abe07835f1f0b71f84078ba4c" +checksum = "7ee7ca48902bba9432e91d3ea76d268f3d13ce0082fdd845729248a3527b625f" dependencies = [ "fontconfig-parser", "log", @@ -235,9 +235,9 @@ dependencies = [ [[package]] name = "rustybuzz" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a617c811f5c9a7060fe511d35d13bf5b9f0463ce36d63ce666d05779df2b4eba" +checksum = "4930b3853d030e596c8912da1c3d9b5e898c24b109d459e05166999860792118" dependencies = [ "bitflags", "bytemuck", @@ -323,9 +323,9 @@ dependencies = [ [[package]] name = "ttf-parser" -version = "0.15.2" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3e06c9b9d80ed6b745c7159c40b311ad2916abb34a49e9be2653b90db0d8dd" +checksum = "375812fa44dab6df41c195cd2f7fecb488f6c09fbaafb62807488cefab642bff" [[package]] name = "unicode-bidi" @@ -347,9 +347,9 @@ checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1" [[package]] name = "unicode-general-category" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07547e3ee45e28326cc23faac56d44f58f16ab23e413db526debce3b0bfd2742" +checksum = "2281c8c1d221438e373249e065ca4989c4c36952c211ff21a0ee91c44a3869e7" [[package]] name = "unicode-script" @@ -381,7 +381,6 @@ dependencies = [ "siphasher", "strict-num", "svgtypes", - "ttf-parser", "unicode-bidi", "unicode-script", "unicode-vo", diff --git a/usvg/Cargo.toml b/usvg/Cargo.toml index 7f81f1106..52d91640a 100644 --- a/usvg/Cargo.toml +++ b/usvg/Cargo.toml @@ -35,9 +35,8 @@ siphasher = "0.3" svgtypes = "0.8" # for text to path -fontdb = { version = "0.9", optional = true, default-features = false } -rustybuzz = { version = "0.5", optional = true } -ttf-parser = { version = "0.15", optional = true } +fontdb = { version = "0.9.2", optional = true, default-features = false } +rustybuzz = { version = "0.5.2", optional = true } unicode-bidi = { version = "0.3", optional = true } unicode-script = { version = "0.5", optional = true } unicode-vo = { version = "0.1", optional = true } @@ -51,7 +50,6 @@ filter = [] text = [ "fontdb", "rustybuzz", - "ttf-parser", "unicode-bidi", "unicode-script", "unicode-vo", diff --git a/usvg/src/text/fontdb_ext.rs b/usvg/src/text/fontdb_ext.rs index 32a83f9d9..44ac28314 100644 --- a/usvg/src/text/fontdb_ext.rs +++ b/usvg/src/text/fontdb_ext.rs @@ -5,6 +5,8 @@ use std::convert::TryFrom; use std::num::NonZeroU16; +use rustybuzz::ttf_parser; + use fontdb::{Database, ID}; use ttf_parser::GlyphId; @@ -20,7 +22,7 @@ impl DatabaseExt for Database { #[inline(never)] fn load_font(&self, id: ID) -> Option { self.with_face_data(id, |data, face_index| -> Option { - let font = ttf_parser::Face::from_slice(data, face_index).ok()?; + let font = ttf_parser::Face::parse(data, face_index).ok()?; let units_per_em = NonZeroU16::new(font.units_per_em())?; @@ -93,7 +95,7 @@ impl DatabaseExt for Database { #[inline(never)] fn outline(&self, id: ID, glyph_id: GlyphId) -> Option { self.with_face_data(id, |data, face_index| -> Option { - let font = ttf_parser::Face::from_slice(data, face_index).ok()?; + let font = ttf_parser::Face::parse(data, face_index).ok()?; let mut builder = PathBuilder { path: PathData::new(), @@ -106,7 +108,7 @@ impl DatabaseExt for Database { #[inline(never)] fn has_char(&self, id: ID, c: char) -> bool { let res = self.with_face_data(id, |font_data, face_index| -> Option { - let font = ttf_parser::Face::from_slice(font_data, face_index).ok()?; + let font = ttf_parser::Face::parse(font_data, face_index).ok()?; font.glyph_index(c)?; Some(true) }); diff --git a/usvg/src/text/shaper.rs b/usvg/src/text/shaper.rs index 1370c66ce..00b7596c5 100644 --- a/usvg/src/text/shaper.rs +++ b/usvg/src/text/shaper.rs @@ -3,7 +3,7 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. use kurbo::{ParamCurve, ParamCurveArclen, ParamCurveDeriv}; -use ttf_parser::GlyphId; +use rustybuzz::ttf_parser::GlyphId; use unicode_script::UnicodeScript; use unicode_vo::Orientation as CharOrientation;