Repository navigation
Conversation
…obat does Acrobat 26 redrew our fields itself, and its saved drawings are the reference: - Check boxes, radio buttons and push buttons draw every border style: they share the text field's box (WriteFieldBox), and a radio button that shows a circle draws it in the middle of its box, as wide as the box is high, with beveled and inset edges as half circles and underline as the whole circle. BuildCheckboxBoxStream is gone. - A beveled widget border's shaded edges are the background less a quarter, on every field kind (GenerateBorderAP takes the shade). - A push button's picture is fitted twice the border's width in, and its caption sits where Acrobat puts it, with room that grows with the border (ButtonPlate, SplitButton). With no room left the picture is left out. - A field's automatic size is the largest its text fits at, not a step of CPVT's ladder; a list box's fits its widest option, at most 12; a check box's check is as large as Acrobat's.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cause
Acrobat 26 redrew our fields itself on Nov 26 2026: 30 fields of every kind in five border styles,
244 push buttons across ten borders and three sizes, and 33 fields at the automatic text size. Its
saved drawings showed three ways ours differ.
(
BuildCheckboxBoxStream) that never read/BS /S: dashed drew solid, beveled and inset drew aframe twice as thick, and underline drew a whole frame. Acrobat draws every style on these kinds
as on a text field. A radio button was an ellipse filling its box, where Acrobat draws a circle
as wide as the box is high, in the middle. A beveled border's shaded edges were mid grey on every
field kind, where Acrobat shades them by the background (the background less a quarter, light
grey without one).
SplitButtonfollowed upstream's form filler: the picture one border width inand a side caption against the picture. Acrobat fits the picture twice the border's width in, and
leaves room around the caption that grows with the border.
that fits; Acrobat fits the text exactly, so ours was often 5 to 10% smaller. A list box always
drew at 12, so a long option ran past the edge and the rows below it were cut off. A check box's
check was half the size of Acrobat's.
Change
WriteFieldBox): text, signature, check box, pushbutton (with a caption and with a picture alone) and a radio button that shows a symbol other
than a circle.
BuildCheckboxBoxStreamis gone.RadioCircleOf,WriteRadioCircleBox): in the middle of the box, as wide asthe box is high. The background fills it; the border is a circle line half its width in, dashed
when the border is; beveled and inset add two half circles inside it, lit at the upper left and
shaded at the lower right; underline draws the whole circle. The dot is half the circle inside
its border, in every state.
BeveledShade):GenerateBorderAPtakes a beveled border's shade from itscaller. Widgets pass the background less a quarter (light grey without one), so text, combo, list
and signature fields change too; free text keeps mid grey.
ButtonPlate,SplitButton): the picture's part is twice the border's widthbin (BorderStyleInfo's width, which counts beveled and inset twice). The caption's stripreaches
3band its extent in from its edge, and the caption sits in the middle of the roomAcrobat measures from:
babove the bottom edge,2bbelow the top, the right edge itself,2bin from the left. So a caption right of the picture ends
1.5bfrom the edge and starts1.5bfrom the picture. When the strip leaves the picture no room, the picture is left out and the
caption is drawn alone where the rule puts it. Captions are clipped to the button inside its
border, as Acrobat clips them.
CPDF_RichTextLayout::ArrangeField): the largest size the text fits at, to athousandth of a point, between the ladder's ends (4 and 144; 12 for several lines). FreeText still
steps down the ladder. A redaction label at size 0 goes through the same layout and fits exactly
too.
ListBoxAutoSize): at size 0 the widest option fits the width inside twice theborder, at most 12. Rows start
2bin, as Acrobat's do; the highlight still reaches the border.CheckSymbolRect): as large as Acrobat's ZapfDingbats check, whose size fills thebox inside its border less
bat each side with the font's box (0.963 of the size); the mark is0.719 of that size high, in the middle. A radio button that shows a check gets the same mark.
DashOperatormoves tocpdf_appearancegenerator_internal.h. The ledger'sown-appearance-generatorandrich-textrules say all of this.Tests
CPDFGenerateAPTest.WidgetBoxesDrawEveryBorderStyle: every rectangular widget kind draws thesame box as a text field in every style, with Acrobat's geometry.
ChoiceFieldsShadeABeveledBorderByTheirBackground,RadioButtonsDrawACircleInTheMiddleOfTheBox(every style, the dot, underline drawn whole).
BorderArrayDrawsAsBorderStyleForEveryKind: everykind now draws dashes.
EPDFWidgetDrawingEmbedderTest.AButtonIsSharedAsAcrobatSharesItreplacesAButtonIsSharedAsTheFormFillerSharesIt: Acrobat's measured gaps for ten borders and three sizes,and its no-room case.
ACaptionThatLeavesTheIconNoRoomIsAlonereplacesACaptionTooLargeForTheButtonIsDrawnAlone. The other layout tests now check Acrobat's rule(
AcrobatButtonParts()in the test, plus explicit numbers inACaptionAndAnIconEachTakeTheirPart).epdf_widget_text_size_embeddertest.cpp: a long value fills the width (Acrobat's 8.679), ashort one fills the height, several lines stop at 12, a list box fits its widest option
(Acrobat's 8.199 and 12), and the check's size.
EPDFRichTextLayoutEmbedderTest.FieldMatchesCpvt: at size 0 the fitted size is never underCPVT's step, and the characters are where CPVT puts them at that size.
EPDFAppearanceStateEmbedderTest.RadioButtonDrawsTheSymbolItsCaptionNames: the new operators.7f399f838(built and run there);FieldMatchesCpvtpasses onboth.
Checked
base. Saved-file checker over the run's 111 saves: passed. Pixel runner on the base and the
branch: the same 51 failures of 224.
names the two new tests and drops the two old names; no other count moved.
check-fork-tags.py --strict,check-c-api.py(604 functions),check-globals.pyon the macOSlibrary: passed.
Not run:
check-globals.pyon a Linux library (a full build under emulation); the macOS one passed.output/picture-buttons-acrobat-check, round four): every 12 pt spacingcolumn matches within 0.02 pt except the caption below the picture: a 0.40 pt higher strip and
a 0.31 pt lower baseline at every border, and 0.52 pt lower when the picture has no room. Our
caption line is the font's (Helvetica 14.03 high at 12), Acrobat's its own (13.63). Width-decided automatic sizes match within 0.2%; height-decided
ones are about 5% larger than Acrobat's for the same reason. Border styles: every kind's row
matches Acrobat's drawing.
Left
tests that read a widget's drawing or an automatic size may move at the pin.
font's own measures, not Acrobat's Helvetica factors, so they stay about 5% larger and 0.3 to
0.5 pt off there.
arrow (Acrobat draws none).