rusttype: build with no_std
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
e4cf2563be
commit
c50a772693
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -36,6 +36,11 @@ name = "hashbrown"
|
|||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libm"
|
||||||
|
version = "0.1.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-traits"
|
name = "num-traits"
|
||||||
version = "0.2.9"
|
version = "0.2.9"
|
||||||
@ -68,6 +73,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"approx 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"approx 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libm 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"stb_truetype 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"stb_truetype 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@ -83,6 +89,7 @@ version = "0.3.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libm 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
@ -92,6 +99,7 @@ dependencies = [
|
|||||||
"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5"
|
"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5"
|
||||||
"checksum fontdue 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3ce5d972ee28d2830f868d3e1398721e0966a32113b888d8553712b50b1d03"
|
"checksum fontdue 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3ce5d972ee28d2830f868d3e1398721e0966a32113b888d8553712b50b1d03"
|
||||||
"checksum hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353"
|
"checksum hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353"
|
||||||
|
"checksum libm 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
|
||||||
"checksum num-traits 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "443c53b3c3531dfcbfa499d8893944db78474ad7a1d87fa2d94d1a2231693ac6"
|
"checksum num-traits 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "443c53b3c3531dfcbfa499d8893944db78474ad7a1d87fa2d94d1a2231693ac6"
|
||||||
"checksum ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "18869315e81473c951eb56ad5558bbc56978562d3ecfb87abb7a1e944cea4518"
|
"checksum ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "18869315e81473c951eb56ad5558bbc56978562d3ecfb87abb7a1e944cea4518"
|
||||||
"checksum rusttype 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6fa38506b5cbf2fb67f915e2725cb5012f1b9a785b0ab55c4733acda5f6554ef"
|
"checksum rusttype 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6fa38506b5cbf2fb67f915e2725cb5012f1b9a785b0ab55c4733acda5f6554ef"
|
||||||
|
@ -9,4 +9,4 @@ edition = "2018"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
fontdue = "0.0.1"
|
fontdue = "0.0.1"
|
||||||
stats_alloc = "0.1.8"
|
stats_alloc = "0.1.8"
|
||||||
rusttype = "0.8.1"
|
rusttype = {version = "0.8.1", default-features = false, features = ["libm-math"] }
|
||||||
|
@ -13,14 +13,20 @@ fn main() {
|
|||||||
let font = include_bytes!("../resources/WenQuanYiMicroHei-01.ttf");
|
let font = include_bytes!("../resources/WenQuanYiMicroHei-01.ttf");
|
||||||
let message = " 發啊你好";
|
let message = " 發啊你好";
|
||||||
let rtl = false;
|
let rtl = false;
|
||||||
|
println!();
|
||||||
|
println!("RUSTTYPE TEST:");
|
||||||
test_rusttype(font, message, rtl);
|
test_rusttype(font, message, rtl);
|
||||||
|
println!("FONTDUE TEST:");
|
||||||
test_fontdue(font, message, rtl);
|
test_fontdue(font, message, rtl);
|
||||||
|
|
||||||
// Arabic test
|
// Arabic test
|
||||||
let font = include_bytes!("../resources/LateefRegOT.ttf");
|
let font = include_bytes!("../resources/LateefRegOT.ttf");
|
||||||
let message = "مرحبا بالعالم";
|
let message = "مرحبا بالعالم";
|
||||||
let rtl = true;
|
let rtl = true;
|
||||||
|
println!();
|
||||||
|
println!("RUSTTYPE TEST:");
|
||||||
test_rusttype(font, message, rtl);
|
test_rusttype(font, message, rtl);
|
||||||
|
println!("FONTDUE TEST:");
|
||||||
test_fontdue(font, message, rtl);
|
test_fontdue(font, message, rtl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user