rustybuzz: update to 0.4

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-07-22 12:58:27 +08:00
parent 324669af0c
commit 259ace91bf
3 changed files with 21 additions and 27 deletions

42
Cargo.lock generated
View File

@ -23,6 +23,12 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
[[package]]
name = "bytemuck"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9966d2ab714d0f785dbac0a0396251a35280aeb42413281617d0209ab4898435"
[[package]] [[package]]
name = "cast" name = "cast"
version = "0.2.3" version = "0.2.3"
@ -37,9 +43,6 @@ name = "cc"
version = "1.0.65" version = "1.0.65"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95752358c8f7552394baf48cd82695b345628ad3f170d607de3ca03b8dacca15" checksum = "95752358c8f7552394baf48cd82695b345628ad3f170d607de3ca03b8dacca15"
dependencies = [
"jobserver",
]
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
@ -94,15 +97,6 @@ dependencies = [
"wasi", "wasi",
] ]
[[package]]
name = "jobserver"
version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2"
dependencies = [
"libc",
]
[[package]] [[package]]
name = "lazy_static" name = "lazy_static"
version = "1.4.0" version = "1.4.0"
@ -478,14 +472,14 @@ dependencies = [
[[package]] [[package]]
name = "rustybuzz" name = "rustybuzz"
version = "0.2.0" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09e91a1066320c9d45c87f2191f78a4a4402d8cc66b896abd696ec275515c0b8" checksum = "44561062e583c4873162861261f16fd1d85fe927c4904d71329a4fe43dc355ef"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"cc", "bytemuck",
"smallvec", "smallvec",
"ttf-parser 0.8.3", "ttf-parser 0.12.3",
"unicode-bidi-mirroring", "unicode-bidi-mirroring",
"unicode-ccc", "unicode-ccc",
"unicode-general-category", "unicode-general-category",
@ -539,9 +533,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
[[package]] [[package]]
name = "smallvec" name = "smallvec"
version = "1.5.0" version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7acad6f34eb9e8a259d3283d1e8c1d34d7415943d4895f65cc73813c7396fc85" checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
[[package]] [[package]]
name = "stats_alloc" name = "stats_alloc"
@ -571,9 +565,9 @@ checksum = "3e5d7cd7ab3e47dda6e56542f4bbf3824c15234958c6e1bd6aaa347e93499fdc"
[[package]] [[package]]
name = "ttf-parser" name = "ttf-parser"
version = "0.8.3" version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7622061403fd00f0820df288e5a580e87d3ce15a1c4313c59fd1ffb77129903f" checksum = "7ae2f58a822f08abdaf668897e96a5656fe72f5a9ce66422423e8849384872e6"
[[package]] [[package]]
name = "unicode-bidi-mirroring" name = "unicode-bidi-mirroring"
@ -583,15 +577,15 @@ checksum = "56d12260fb92d52f9008be7e4bca09f584780eb2266dc8fecc6a192bec561694"
[[package]] [[package]]
name = "unicode-ccc" name = "unicode-ccc"
version = "0.1.0" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbf4a1771ba99c4c8f6e5b1a37a208e970e77ed7297e29963dd1a2303601cd33" checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1"
[[package]] [[package]]
name = "unicode-general-category" name = "unicode-general-category"
version = "0.2.0" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f9af028e052a610d99e066b33304625dea9613170a2563314490a4e6ec5cf7f" checksum = "07547e3ee45e28326cc23faac56d44f58f16ab23e413db526debce3b0bfd2742"
[[package]] [[package]]
name = "unicode-script" name = "unicode-script"

View File

@ -9,7 +9,7 @@ version = "0.1.0"
[dependencies] [dependencies]
minifb = "0.17" minifb = "0.17"
rusttype = {version = "0.9.2", default-features = false, features = ["libm-math"]} rusttype = {version = "0.9.2", default-features = false, features = ["libm-math"]}
rustybuzz = "0.2.0" rustybuzz = "0.4.0"
stats_alloc = "0.1.8" stats_alloc = "0.1.8"
[profile.release] [profile.release]

View File

@ -113,7 +113,7 @@ fn test_rusthbuzz(font: &[u8], message: &str) {
let reg = Region::new(&GLOBAL); let reg = Region::new(&GLOBAL);
let mut buzz_font = rustybuzz::Font::from_slice(font, 0).unwrap(); let mut buzz_font = rustybuzz::Face::from_slice(font, 0).unwrap();
println!("buzz_font: {:#?}", reg.change()); println!("buzz_font: {:#?}", reg.change());
buzz_font.set_pixels_per_em(Some((196, 196))); buzz_font.set_pixels_per_em(Some((196, 196)));
@ -157,7 +157,7 @@ fn test_rusthbuzz(font: &[u8], message: &str) {
// let codepoint_rs = char::try_from(buzz_info.codepoint).expect("invalid codepoint"); // let codepoint_rs = char::try_from(buzz_info.codepoint).expect("invalid codepoint");
let font_glyph = rusttype_font.glyph(rusttype::GlyphId( let font_glyph = rusttype_font.glyph(rusttype::GlyphId(
buzz_info buzz_info
.codepoint .glyph_id
.try_into() .try_into()
.expect("codepoint out of range"), .expect("codepoint out of range"),
)); ));