diff --git a/crates/engine/src/cmd/typecmd/area_tests.rs b/crates/engine/src/cmd/typecmd/area_tests.rs index c68334e2c0..db1712a7f8 100644 --- a/crates/engine/src/cmd/typecmd/area_tests.rs +++ b/crates/engine/src/cmd/typecmd/area_tests.rs @@ -1688,10 +1688,9 @@ fn warichu_is_a_character_attribute_set_saved_and_exported() { assert!(["warichu", "warichuLines", "warichuGap", "warichuScale", "warichuAlign"].iter().all(|k| saved.get(*k).is_none()), "{saved}"); let plain_svg = vectorcraft_svg::export(&s.doc().unwrap().doc, &Default::default()); let plain_pdf = vectorcraft_pdf::export(&s.doc().unwrap().doc, &vectorcraft_pdf::PdfOptions::uncompressed()).unwrap(); - let text_ops = |pdf: &[u8]| { - let s = String::from_utf8_lossy(pdf); - s.contains("Tj") || s.contains("TJ") - }; + // Only text objects count: the file ID in the trailer and the XMP is base64 that changes each + // second and now and then spells `Tj` or `TJ`. + let text_ops = |pdf: &[u8]| String::from_utf8_lossy(pdf).lines().any(|l| l.starts_with("BT ") && (l.contains("Tj") || l.contains("TJ"))); assert!(plain_svg.contains("