Skip to content

Commit

Permalink
Bump dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
RazrFalcon committed Oct 22, 2022
1 parent 10fe663 commit 59b57b0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
17 changes: 8 additions & 9 deletions Cargo.lock

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

6 changes: 2 additions & 4 deletions usvg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -51,7 +50,6 @@ filter = []
text = [
"fontdb",
"rustybuzz",
"ttf-parser",
"unicode-bidi",
"unicode-script",
"unicode-vo",
Expand Down
8 changes: 5 additions & 3 deletions usvg/src/text/fontdb_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
use std::convert::TryFrom;
use std::num::NonZeroU16;

use rustybuzz::ttf_parser;

use fontdb::{Database, ID};
use ttf_parser::GlyphId;

Expand All @@ -20,7 +22,7 @@ impl DatabaseExt for Database {
#[inline(never)]
fn load_font(&self, id: ID) -> Option<Font> {
self.with_face_data(id, |data, face_index| -> Option<Font> {
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())?;

Expand Down Expand Up @@ -93,7 +95,7 @@ impl DatabaseExt for Database {
#[inline(never)]
fn outline(&self, id: ID, glyph_id: GlyphId) -> Option<PathData> {
self.with_face_data(id, |data, face_index| -> Option<PathData> {
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(),
Expand All @@ -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<bool> {
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)
});
Expand Down
2 changes: 1 addition & 1 deletion usvg/src/text/shaper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 59b57b0

Please sign in to comment.