Merge 170091013e15d57388a3062603e5e8250906b294 into a96553648551b94652f4b1139c440d53c806836f

This commit is contained in:
Joe Cardoso 2025-11-29 14:13:16 +09:00 committed by GitHub
commit 24ea7df8a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 28 additions and 0 deletions

View File

@ -1207,6 +1207,25 @@ class Caption extends XFAObject {
return HTMLResult.EMPTY;
}
// For checkButton captions, add a non-breaking space at the beginning
// and replace all spaces with non-breaking spaces to prevent word wrapping
const parent = this[$getParent]();
if (
parent?.ui?.checkButton &&
typeof value === "object" &&
value.children
) {
for (const child of value.children) {
if (child.value && typeof child.value === "string") {
// Replace all regular spaces with non-breaking spaces
child.value = child.value.startsWith(" ")
? child.value.replaceAll(" ", "\u00A0")
: "\u00A0" + child.value.replaceAll(" ", "\u00A0");
child.value = child.value.replaceAll("/", "\u2044");
}
}
}
const savedReserve = this.reserve;
if (this.reserve <= 0) {
const { w, h } = this[$getExtra](availableSpace);

View File

@ -93,6 +93,7 @@
!issue8372.pdf
!issue9713.pdf
!xfa_filled_imm1344e.pdf
!xfa_bug1716806.pdf
!issue8424.pdf
!issue8480.pdf
!bug1650302_reduced.pdf

Binary file not shown.

View File

@ -2128,6 +2128,14 @@
"enableXfa": true,
"type": "eq"
},
{
"id": "xfa_bug1716806",
"file": "pdfs/xfa_bug1716806.pdf",
"md5": "ed78b522c661e744f780ab9b6d09fd8d",
"rounds": 1,
"enableXfa": true,
"type": "eq"
},
{
"id": "xfa_bug1716809",
"file": "pdfs/xfa_bug1716809.pdf",