diff --git a/examples/text/Cargo.toml b/examples/text/Cargo.toml index 09c06c2a..f1472446 100644 --- a/examples/text/Cargo.toml +++ b/examples/text/Cargo.toml @@ -8,6 +8,7 @@ publish = false [dependencies] ab_glyph = { version = "0.2", optional = true } fontdb = "0.9" +log = "0.4" orbclient = "0.3" memmap2 = "0.5" rusttype = { version = "0.9", optional = true } diff --git a/examples/text/src/font/matches.rs b/examples/text/src/font/matches.rs index e3efaaab..dd9ec467 100644 --- a/examples/text/src/font/matches.rs +++ b/examples/text/src/font/matches.rs @@ -27,7 +27,7 @@ impl<'a> FontMatches<'a> { assert_eq!(rtl, span_rtl); if font_i == 0 { - println!( + log::debug!( " Word {}{}: '{}'", if rtl { "RTL" } else { "LTR" }, if blank { " BLANK" } else { "" }, @@ -180,7 +180,7 @@ impl<'a> FontMatches<'a> { fn shape_span(&self, line: &str, start_span: usize, end_span: usize, line_rtl: bool, span_rtl: bool) -> FontShapeSpan { let span = &line[start_span..end_span]; - println!(" Span {}: '{}'", if span_rtl { "RTL" } else { "LTR" }, span); + log::debug!(" Span {}: '{}'", if span_rtl { "RTL" } else { "LTR" }, span); let mut words = Vec::new(); @@ -232,7 +232,7 @@ impl<'a> FontMatches<'a> { let para_info = &bidi.paragraphs[0]; let line_rtl = para_info.level.is_rtl(); - println!("Line {}: '{}'", if line_rtl { "RTL" } else { "LTR" }, line); + log::debug!("Line {}: '{}'", if line_rtl { "RTL" } else { "LTR" }, line); let paragraph = unicode_bidi::Paragraph::new(&bidi, ¶_info); diff --git a/examples/text/src/main.rs b/examples/text/src/main.rs index f5cb9310..185577ad 100644 --- a/examples/text/src/main.rs +++ b/examples/text/src/main.rs @@ -71,7 +71,7 @@ fn main() { }; if matched { - println!( + log::debug!( "{:?}: family '{}' postscript name '{}' style {:?} weight {:?} stretch {:?} monospaced {:?}", info.id, info.family,