Use log to reduce prints

This commit is contained in:
Jeremy Soller 2022-10-12 13:59:23 -06:00
parent 419f2dc612
commit a1d4553a17
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
3 changed files with 5 additions and 4 deletions

View file

@ -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, &para_info);

View file

@ -71,7 +71,7 @@ fn main() {
};
if matched {
println!(
log::debug!(
"{:?}: family '{}' postscript name '{}' style {:?} weight {:?} stretch {:?} monospaced {:?}",
info.id,
info.family,