Skip to content

Commit 4829360

Browse files
committed
Only print unicode mismatches when the normalized forms don't match
1 parent f918b2f commit 4829360

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,9 @@ impl<'a> PdfSimpleFont<'a> {
494494
Entry::Occupied(e) => {
495495
if e.get() != &String::from_utf16(&be).unwrap() {
496496
let normal_match = e.get().nfkc().eq(String::from_utf16(&be).unwrap().nfkc());
497-
warn!("Unicode mismatch {} {} {:?} {:?} {:?}", normal_match, name, e.get(), String::from_utf16(&be), be);
497+
if !normal_match {
498+
warn!("Unicode mismatch {} {} {:?} {:?} {:?}", normal_match, name, e.get(), String::from_utf16(&be), be);
499+
}
498500
}
499501
}
500502
}

0 commit comments

Comments
 (0)