Use log to reduce prints
This commit is contained in:
parent
419f2dc612
commit
a1d4553a17
3 changed files with 5 additions and 4 deletions
|
|
@ -8,6 +8,7 @@ publish = false
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ab_glyph = { version = "0.2", optional = true }
|
ab_glyph = { version = "0.2", optional = true }
|
||||||
fontdb = "0.9"
|
fontdb = "0.9"
|
||||||
|
log = "0.4"
|
||||||
orbclient = "0.3"
|
orbclient = "0.3"
|
||||||
memmap2 = "0.5"
|
memmap2 = "0.5"
|
||||||
rusttype = { version = "0.9", optional = true }
|
rusttype = { version = "0.9", optional = true }
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ impl<'a> FontMatches<'a> {
|
||||||
assert_eq!(rtl, span_rtl);
|
assert_eq!(rtl, span_rtl);
|
||||||
|
|
||||||
if font_i == 0 {
|
if font_i == 0 {
|
||||||
println!(
|
log::debug!(
|
||||||
" Word {}{}: '{}'",
|
" Word {}{}: '{}'",
|
||||||
if rtl { "RTL" } else { "LTR" },
|
if rtl { "RTL" } else { "LTR" },
|
||||||
if blank { " BLANK" } else { "" },
|
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 {
|
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];
|
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();
|
let mut words = Vec::new();
|
||||||
|
|
||||||
|
|
@ -232,7 +232,7 @@ impl<'a> FontMatches<'a> {
|
||||||
let para_info = &bidi.paragraphs[0];
|
let para_info = &bidi.paragraphs[0];
|
||||||
let line_rtl = para_info.level.is_rtl();
|
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);
|
let paragraph = unicode_bidi::Paragraph::new(&bidi, ¶_info);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ fn main() {
|
||||||
};
|
};
|
||||||
|
|
||||||
if matched {
|
if matched {
|
||||||
println!(
|
log::debug!(
|
||||||
"{:?}: family '{}' postscript name '{}' style {:?} weight {:?} stretch {:?} monospaced {:?}",
|
"{:?}: family '{}' postscript name '{}' style {:?} weight {:?} stretch {:?} monospaced {:?}",
|
||||||
info.id,
|
info.id,
|
||||||
info.family,
|
info.family,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue