From 1f6bd957a4f9b1ba412005e9da4ed0bf48cf10bd Mon Sep 17 00:00:00 2001 From: mtlcl410 <2368091+mtlcl410@users.noreply.github.com> Date: Wed, 28 Oct 2026 16:54:21 +0800 Subject: [PATCH] M12: the fontless button caption test also checks the button's height Without a fixed height the button is measured from its caption, so the test now leaves `h` out and checks the button is one line of the field's font tall, besides the face it is drawn in. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01CBVyQEwtmEw3mS1MoAiwrK --- crates/xfa/src/tests.rs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/crates/xfa/src/tests.rs b/crates/xfa/src/tests.rs index 5a7b7124d3..7da9321059 100644 --- a/crates/xfa/src/tests.rs +++ b/crates/xfa/src/tests.rs @@ -3318,16 +3318,21 @@ fn a_caption_without_a_font_of_its_own_takes_its_fields() { #[test] fn a_button_caption_without_a_font_of_its_own_takes_its_fields() { - // An Arial 8pt button: a caption naming no font is shown in Arial 8pt, not the 10pt Courier - // default, and one naming only a size keeps the field's typeface. - let face = |caption_font: &str| { + // An Arial 8pt button without a height: a caption naming no font is shown in Arial 8pt, not + // the 10pt Courier default, and the button is as tall as one 8pt line; one naming only a size + // keeps the field's typeface. + let button = |caption_font: &str| { let items = positioned(&format!( - r#"