Repository navigation
fix(layout): keep images, charts, list markers and glyphs inside their box - #472
Merged
Merged
Conversation
LayoutImageRenderer checked Height against the available area but let Width of any size through unclamped, so a caller-supplied Width wider than the content box drew the image past the right edge. Clamp Width the same way Height already is, and only rescale Height for the clamp when it was null to begin with -- an explicit Height is the caller asking for a non-proportional box, and clamping the width alone is already as close to that intent as the box allows.
PieChartRenderer placed a wedge circle at the caller's Diameter with no check against the space Layout was handed, so a diameter wider than the content box centred or right-aligned past its edge. Clamp against ctx.Area.Width, the area Layout receives before PieChart.Margins (6pt by default) is deflated from it -- clamping against the deflated width instead would move a chart that already fits today, since a 300pt diameter with the default margins spans exactly a 300pt content box. Shrink the height reservation by the same clamped diameter so it stops holding vertical space nothing draws in.
GeometryExtent bounded a c operator by its own control points, and those overshoot the drawn curve: measured on a chart's own wedge circle, up to 1.13216 times the true extent, which is wide enough to mask a real placement defect behind an inflated pass. Replace the separate m/l and c passes with one ordered walk that tracks the current point the way path construction actually defines it -- m, l, h and re all update it, re leaves it at the rectangle's own corner since re is m l l l h, and a c takes its start from whatever came before rather than assuming the origin -- then bounds each cubic by solving its derivative for the interior extrema instead of by its control points.
HardBreakWord always emits the first rune of a word wider than the box, since a glyph that wide cannot be broken further, and the Centre and Right alignment arms placed that line by area.Width - lineWidth with no floor, which is negative for such a line and hangs its start off the left edge instead of overflowing to the right. No placement keeps the line fully inside the box, so floor at the origin instead -- the least-wrong placement rather than the current one.
The marker paragraph has zero margins and the content paragraph is indented by a constant _list.Indent, so a marker wider than the indent draws into the content text instead of beside it -- at Helvetica 10pt with the default 20pt indent, the first ordered-roman marker wide enough to do that is item 27. Widen the gutter to the marker's own width per item, both at the top level and in the nested arm, so items whose marker already fits keep today's exact indent. Bounded so a marker as wide as the whole item area cannot widen the gutter until the content paragraph has nothing left to lay out in.
ValidDoc built a paragraph, a list and a table, so neither renderer this pull request touches had any property coverage: the page-box invariant could not have caught either defect. Add an image sized well past the content box and a chart diameter clamped only enough to keep it from being too tall, so both routinely reach past the page before this fix and stay inside it after. Raise the list item ceiling past 27 so an ordered-roman marker sometimes reaches the width the gutter fix targets. The chart is generated at Centre alignment only. The acceptance table this pull request works from verifies Centre; measured at scale, a Left- or Right-aligned chart whose clamped diameter lands at exactly ctx.Area.Width still overshoots the page by up to the chart's own margin, since Left and Right have no symmetric offset to absorb it the way Centre does. That corner is not one this fix closes, so the property is not widened into it.
Known-answer coverage for the fixes in this pull request, sectioned by site: an image and a chart wider than their content box, a list marker wider than its indent, and an unbreakable paragraph glyph wider than its box. Two more pin the exact curve-extent walk every image and chart assertion here depends on: a full circle whose control points the earlier control-hull reader measured well outside the drawn curve, and a curve whose extent only comes out right when the walk takes its start from the preceding m rather than the origin. Each of the four placement cases was confirmed against a reverted copy of its own fix and fails there; the two reader cases were confirmed the same way against the control-hull code they replace.
Entries under Unreleased/Fixed for the image width clamp, the pie chart diameter clamp, the paragraph glyph floor, and the list marker gutter widen, each with the measured before/after coordinates.
Clamping the diameter left two of the three alignments outside the content box, and only Centre hid it. Left and Right take their offset from the area the chart's own margins deflate, so a circle clamped to the box is then shifted out of it by a margin. Measured on a 400x900pt page with 50pt margins, a content box of [50, 350] and the default 6pt chart margins: Left gave [56, 356] and Right [44, 344]. On a 454.4pt-wide page with a 1.2pt document margin, the same shift put each of them 4.8pt off the page rather than merely out of the box. Draw now aligns within the content box once the circle no longer fits between its own margins, and within the margins while it still does. The margins are what give way, because they are the chart's own preference while the box is the page's limit. A box-filling circle is then placed identically under all three alignments: in the 179-document corpus the centred document's bytes are unchanged and the other two now hash to its value. The vertical margins are untouched, since the height reservation includes them. This also removes the generator exclusion the previous commit needed. The property suite now builds its chart at the generated alignment rather than at Centre, so the corner this defect lived in is covered rather than stepped around. Refs #365
Both said a fitting line is safe because equal operands give +0, which is only the equal case. WordWrap accepts a line on a running total accumulated as total + (space + word), while the draw arm re-adds fragment widths the merge built as (width + space) + word. Those associate differently, so a line exactly on the boundary can reach the floor a last bit over it, and the +0 argument does not cover it. What does cover it is the number format: the offset is added to the box origin before PdfCanvas formats to five decimals, so a difference that small survives only where the origin is 0. The corpus includes that geometry under all four alignments and shows no byte difference. Both the comment and the changelog now say that, and say what was not searched. The nested list gutter's comment also gave a false reason for its form. It claimed indent * 2 already exceeds any marker that would widen the top-level gutter, which is untrue at larger font sizes. The real reason is that a nested marker starts at indent rather than at zero, so its right edge is indent + markerWidth, and comparing a bare width against indent * 2 measures a width against a position. Refs #365
Three adversarial review rounds found several branches this PR adds were untested. Add known-answer cases for the position clamps in PieChartRenderer.Draw and LayoutImageRenderer.Draw (including the row that decides a position clamp over an alignment-basis switch, and a strictly-smaller-than-the-box case for each so the Centre/Right arms of both alignment switches can't be replaced with a constant and stay green), the ListRenderer.WidestWord gutter bound (both the item it accepts and the item it rejects), three untested current-point arms in ContentStreamReadback's path walk (re, l, h), and the defensive guard in LayoutImageRenderer reachable through ordinary margins wider than the content box (the equivalent guard in PieChartRenderer is out of scope here; a reviewer found it unreachable in-tree). Tightened the Width-300.0001 row's tolerance, which passed regardless of the clamp it was meant to pin. Every expected value here was measured by rendering the fixture and reading the stream back, not copied from the review notes; every mutation this class is meant to catch was made, run, and confirmed to fail before being reverted.
The previous commit switched the alignment basis to the content box once the circle no longer fit between the chart's own margins. That moved documents which are correct today: the switch fires for any diameter between the margin-deflated width and the content box, so a 290pt circle sitting inside a 300pt box moved from [56, 346] to [50, 340]. With asymmetric margins it moved centred charts too, which the comment it carried claimed was impossible. Clamping the resulting position instead cannot fire on a circle already inside the box. The measured cases that moved and now do not: diameter 275 and 280 with EdgeInsets(6, 20, 6, 10), and 290 and 292 with the default margins, each under all three alignments. The clamp's own arithmetic parenthesises its difference. Left-associated, (boxX + width) - diameter cancels catastrophically where the circle nearly fills the box, landing below boxX and handing Math.Clamp a maximum below its minimum. The property suite caught that in the image renderer with generated margins, at a maximum of 49.25926 against a minimum of 49.25924. Refs #365
The clamp compared an explicit Width against the width left after the image's own margins deflate the area, so an image that fits the content box but not that narrower area was shrunk. LayoutImage.Margins defaults to zero, which is why this went unnoticed, but a caller who sets them was in the position the chart clamp was written to avoid. Two measured consequences, both on documents that are correct today. A Width of 290 with EdgeInsets(6) in a 300pt box draws to [56, 346], inside the box, and was shrunk to 288. And because a null Height follows the clamped width, the reservation shrank with it: a 400x413pt page holding a paragraph and that image went from two pages to one. It now measures against ctx.Area.Width, as the chart does, and clamps the drawn position into the content box. The position clamp is where the Math.Clamp bound gets its parentheses, for the cancellation the property suite found. Refs #365
The first bound only refused to widen when the gutter would leave a non-positive content width. One point of surviving width is enough to ruin the item: ParagraphRenderer's hard-break loop then emits one line per glyph. Measured on a 60pt-wide page whose 58.88pt marker leaves 1.12pt, item 38's two-letter text became one glyph per line and pushed the following paragraph 360pt down. The bound is now the width at which that loop starts, which is the content's widest whitespace-delimited word. Widening only while that still fits means the fix cannot introduce a hard break the caller's own indent does not already have, and where it cannot widen, today's indent and its overprint are the lesser harm. A caller-supplied indent past the content width is a separate defect and is not touched here; it discards the item text and keeps the marker, and is filed as #476. Refs #365
Three adversarial review rounds found sentences in this branch's comments and CHANGELOG that overstated what the code and its measurements actually support: wrong mechanisms (arc bulge, control-hull exactness), stale counts, single samples written as bounds, and a first-person aside. Fixes prose and figures only; no behaviour changes.
Two comments and one changelog line still cited a 179-document corpus and said no document's bytes differ. Both figures were superseded twice over: the corpus is 211 documents after the reviewer-measured cases were added, and six of its rows do differ, all of them chart, image or list documents that were outside the content box before this branch. What holds for the alignment floor is narrower and is now what the sentences say: no paragraph document in that corpus differs. Also removes a note-taking marker that leaked into two comments from the correction list they were written from. Refs #365
WidestWord bounded the gutter widening by the widest whitespace-delimited word, and String.Split treats a non-breaking space as whitespace while ParagraphRenderer.NormaliseWhitespace deliberately does not, calling it a word character. So the bound understated the widest token and let the widening hard-break a word the caller's own indent would not have. Measured at Helvetica 10pt on an 80pt page with a 20pt indent: the token "AAAA<NBSP>AAAA" measures 56.14 whole, the bound saw 26.68, and item 38 of a roman list was split into "AAAA<NBSP>AAA" and "A" while the earlier items, whose gutter stayed at the indent and therefore had less room, stayed whole. That inversion is the tell and the new test asserts both sides of it. Four claims are corrected alongside it, all found by the same review. A correctly-fitting line does move one byte after all: at a zero-margin origin the floor emits "0" where the unfloored formula emitted "-0", measured on 93 of 1,600 generated single-line zero-margin paragraphs. The corpus missed it because its zero-margin case is a line filling its box exactly, which emits "0" on both sides, so it covered the geometry and not the divergence. The image clamp's skip condition named only the non-positive-width branch. A negative horizontal inset reaches it too, inflating the deflated area so a null Width exceeds the box: measured, an image placed [30, 370] against a [50, 350] box. The clamp comment quoted two figures from an elided exception message that cannot be a throwing instance at that magnitude. The mechanism stands and the argument for the parenthesised form is a proof rather than a figure, so it now reads as one. The reader's hull bound is exact at every multiple of a quarter turn, not only at the default start angle, and 1.13216 is its ratio to the diameter rather than to the true extent, and not its maximum. Refs #365
This was referenced Sep 10, 2026
Tim81
added a commit
that referenced
this pull request
Sep 12, 2026
A review round read every new sentence against the code. Eight were wrong, and three of those in ways a caller would have acted on. A positive-infinity image width is not refused. #472's over-wide clamp resolves it to the content box before validation sees it, so it renders as a full-width image. The property's pre-existing remarks said exactly that, correctly, and the block added last round contradicted them two lines below. That contradiction was invisible because four members ended up with two <remarks> elements each. Two on one member compiles without a warning and renderers show one of the two, so which sentence a reader gets depends on their tool. The pre-existing blocks on all four were already right, so the added ones are gone and only what was genuinely missing is spliced into the originals. A marker wider than the list indent does not overprint the item text. The gutter is widened to the marker's own width, per item, which is the fix this same branch describes in its own changelog. The threshold figure was wrong too: the first roman marker to exceed a 20-point indent at the default style is item 17, not 38. Padding wider than its column does not produce "a cell of markers and no content", and a table cell has no markers at all. The inner width is clamped to one point on both the measure and the draw path, so the text wraps to one glyph per line and every line is placed at the left padding's offset. Measured with 400 points of padding in a 260-point column on a 300-point page: ten glyphs, ten lines, all at x = 420, off the page. A non-finite running-band height is refused, not accepted. All three values throw and no file is written, by three different exceptions, none of which names the band height. H6 is this library's deepest heading tag, not the format's. ISO 32000-2 Table 366 defines Hn for any unsigned integer from one upward, and NOTE 2 says outright that H7 may be used for a seventh-level heading. Two counts were wrong: the generated documentation has 340 entries of which 42 are types, so 298 members, not 340; and the sweep covers nineteen members, not twenty-one, since the two it was modelled on were already done. Finally, the rule itself was in the wrong file. CLAUDE.md is untracked and excluded, so it appears in no clone and in no diff, and CONTRIBUTING.md — which that file itself calls the human-facing guide — said nothing. The rule now lives there, including the two things this round learned: measure each non-finite value separately, and check the member does not already carry a <remarks> block. The rule asks for an <exception> tag wherever a call can throw, and none of the nineteen had one. Thirteen members now do, up from one. Refs #502
Tim81
added a commit
that referenced
this pull request
Sep 12, 2026
A review round read every new sentence against the code. Eight were wrong, and three of those in ways a caller would have acted on. A positive-infinity image width is not refused. #472's over-wide clamp resolves it to the content box before validation sees it, so it renders as a full-width image. The property's pre-existing remarks said exactly that, correctly, and the block added last round contradicted them two lines below. That contradiction was invisible because four members ended up with two <remarks> elements each. Two on one member compiles without a warning and renderers show one of the two, so which sentence a reader gets depends on their tool. The pre-existing blocks on all four were already right, so the added ones are gone and only what was genuinely missing is spliced into the originals. A marker wider than the list indent does not overprint the item text. The gutter is widened to the marker's own width, per item, which is the fix this same branch describes in its own changelog. The threshold figure was wrong too: the first roman marker to exceed a 20-point indent at the default style is item 17, not 38. Padding wider than its column does not produce "a cell of markers and no content", and a table cell has no markers at all. The inner width is clamped to one point on both the measure and the draw path, so the text wraps to one glyph per line and every line is placed at the left padding's offset. Measured with 400 points of padding in a 260-point column on a 300-point page: ten glyphs, ten lines, all at x = 420, off the page. A non-finite running-band height is refused, not accepted. All three values throw and no file is written, by three different exceptions, none of which names the band height. H6 is this library's deepest heading tag, not the format's. ISO 32000-2 Table 366 defines Hn for any unsigned integer from one upward, and NOTE 2 says outright that H7 may be used for a seventh-level heading. Two counts were wrong: the generated documentation has 340 entries of which 42 are types, so 298 members, not 340; and the sweep covers nineteen members, not twenty-one, since the two it was modelled on were already done. Finally, the rule itself was in the wrong file. CLAUDE.md is untracked and excluded, so it appears in no clone and in no diff, and CONTRIBUTING.md — which that file itself calls the human-facing guide — said nothing. The rule now lives there, including the two things this round learned: measure each non-finite value separately, and check the member does not already carry a <remarks> block. The rule asks for an <exception> tag wherever a call can throw, and none of the nineteen had one. Thirteen members now do, up from one. Refs #502
Tim81
added a commit
that referenced
this pull request
Sep 12, 2026
2.3.2 created these boundaries and documented almost none of them. Layout exports 298 members and, before this, one file carried any <exception> tag. Where the refusals fire is what makes that a defect rather than a gap: they are raised from Save, not from the property the caller set, so assigning a non-finite font size throws from a call the programmer never made while the member they did set says nothing. Nineteen members now follow the pattern TextStyle.FontSize already used. A bold sentence names what is refused, which call throws it and why. A following paragraph begins "Do not pass" for input accepted today, says what it does now, and says which major will reject it. Thirteen members carry an <exception> tag, up from one. Covered: the table cell's two spans and its padding, the table border width, the image width and height, the separator line width, the pie chart's slices, diameter, start angle, stroke width and alignment, the heading level, the list indent and nesting depth, the running band's template, height and alignment, the document margins, the four save overloads and PageSize. Eleven sentences written across three rounds did not survive being read against the code, and are in as measured rather than as assumed. A positive-infinity image width is not refused: #472's over-wide clamp resolves it to the content box before validation sees it, so it renders full width. A marker wider than the list indent does not overprint the item text, because the gutter widens to the marker's own width per item, and the first roman marker to exceed a 20-point indent at the default style is item 17, not 38. Padding wider than its column does not produce a cell of markers and no content, and a table cell has no markers at all; the inner width is clamped to one point on both paths, so the text wraps to one glyph per line. The pie chart does not skip a zero-width stroke, since it strokes on StrokeColor being set. A table's grid cannot be suppressed at all, because BorderColor is not nullable. H6 is this library's deepest heading tag, not the format's: ISO 32000-2 Table 366 defines Hn for any unsigned integer from one upward, and NOTE 2 says H7 may be used. The 5e-6 boundary names the width rather than the height, because ValidateImageExtent checks the width first. EdgeInsets.Horizontal is Left plus Right, so 400 points of horizontal padding puts the text at x = 220, and it is Left alone that decides where a line starts. A non-finite running-band height is refused by two exception types across three messages, not three types, and the NaN one does name the band height. Two counts were wrong and are corrected: the generated documentation has 340 entries of which 42 are types, so 298 members; and the sweep covers nineteen members, not twenty-one. Four members had ended up with two <remarks> elements each, which compiles without a warning while renderers show one of the two, so a contradiction between them is invisible until a reader hits it. The pre-existing blocks were right in all four cases, so the added ones are gone and only what was missing is spliced in. The avoid-ai-writing audit over the 2,489 words added here found no vocabulary or hedging problems and two structural ones: thirty-two bold tags, nearly all a bold clause that the next sentence repeats, and sixteen bold labels terminated with a period. The voice now follows the Swiss Ephemeris programmer's reference. Bold marks one operative word, a negation or an obligation, rather than a clause. A trap is marked "Attention:" and a fact about history "NOTE:". Measured over the added prose: bold per thousand words 13 to 7, "Do not" labels 16 to 2, direct address 1 to 32, median sentence 14 words to 11. CONTRIBUTING.md gains the rule itself, so a public member's boundary is written in the same commit as the member instead of swept up at a release. It carries the two things these rounds learned: measure each non-finite value separately, because the three take different branches, and check the member does not already have a <remarks> block. Three defects found while writing this are filed rather than fixed here, since this changes no behaviour: #502, #508, #509 and #510. Refs #502, #508, #509, #510
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.
One mechanism, four sites. A measured extent positioned content without checking that it fit, and
a centre or right alignment then put a coordinate outside its box. #469 fixed the running band. Two
of the remaining six are table sites, filed as #473 and #477, and they edit the code the table pull
request rewrites, so they go there rather than being touched twice. This takes the other four.
This description is written against the branch as it stands after three review rounds, not against
the first version of it. Where a decision changed under review, the section says so, because the
reason a fix is shaped the way it is was usually the finding.
The boundaries, measured before and after
Height20Width300.0001 gave x 49.99995; 320 gave x 40Diameter320 gave [40, 360]Diameter300 gave [50, 350] centred, [56, 356] Left, [44, 344] RightOrderedRomanxxvii.22.22pt drew 2.22pt into the text; item 38xxxviii.29.44pt, by 9.44What decides each fix
The image honoured an explicit
Widthat any size while onlyHeightwas checked. It isclamped to the available width, and a null
Heightrescales with it so the aspect ratio holds. Anexplicit
Heightis left alone: that is the caller asking for a non-proportional box.The clamp measures against
ctx.Area.Width, the areaLayoutwas handed, not the width left afterthe image's own margins deflate it. That distinction came from review.
LayoutImage.Marginsdefaults to zero, so the two agree for most callers, but a caller who sets them had an explicit
width that fits the content box and not the deflated area: a
Widthof 290 withEdgeInsets(6)ina 300pt box draws to [56, 346], inside the box, and the first version shrank it to 288. Because a
null
Heightfollows the clamped width, that also shrank the reservation: a 400x413pt page holdinga paragraph and that image went from two pages to one.
The chart needed the same measurement basis, and for a sharper reason.
PieChart.Marginsdefaults to 6pt, so a
Diameterof 300 already spans exactly the 300pt content box, and clampingagainst the deflated 288 would have moved a correct document to [56, 344].
Clamping the diameter is not sufficient on its own, and only centred charts hide that. Left and
Right take their offset from the deflated area, so a circle clamped to the content box is then
shifted out of it by a margin: [56, 356] and [44, 344] on the fixture above, and on a 454.4pt page
with a 1.2pt document margin, 4.8pt off the page itself in each direction.
The first answer to that was to switch the alignment basis to the content box, and review showed it
moved documents that are correct today. The switch fires for any diameter between the deflated
width and the content box, so a 290pt circle sitting inside a 300pt box moved from [56, 346] to
[50, 340], and with asymmetric margins it moved centred charts too. So the position is clamped
instead, which cannot fire on a circle already inside the box.
The list marker widens its own item's gutter, not the list's. Widening the list to its widest
marker would move items 1 through 26, which render correctly. The nested arm had the same defect and
is widened on the same principle in a different form, because a nested marker starts at the indent
rather than at zero, so its right edge is the indent plus the marker width.
The widening is bounded at the width where
ParagraphRendererstops wrapping and startshard-breaking, which is the content's widest word. The first bound only refused a non-positive
width, and review showed one point of surviving width is enough to ruin the item: measured on a
60pt-wide page whose 58.88pt marker leaves 1.12pt, item 38's two-letter text became one glyph per
line and pushed the following paragraph 360pt down.
The paragraph case cannot be made to fit, so the fix keeps the one thing it can. The precondition
is a single rune wider than the box, not a word:
HardBreakWordflushes whenever the runningfragment plus the next glyph exceeds the width, so every line it emits stays inside except one
consisting of a single over-wide rune. Floored at zero, that line starts at the box's left edge and
overflows right. This is the clamp #469 declined on its own formula, and the two are different
decisions: there the fitted width is proven not to exceed the box.
The reader had to be fixed first
ContentStreamReadback.GeometryExtentbounded every curve by its control hull, noting all threepoints of each
c. It now walks the path in order, tracks the current point throughm,l,hand
re, and solves the derivative per axis to get the drawn extent. Three known-answer cases coverit, one of which fails if a curve is started at the origin instead of at the preceding
m.Be precise about why that was necessary, because the obvious reason is wrong. At the chart's default
start angle the hull span equals the true extent exactly, so this suite as it stands would not have
caught an over-read: restoring the old reader on top of the new renderers leaves all fourteen
properties green. The exact walk is what makes a generated start angle possible, and what makes the
1.13216 hull over-read at a start angle of 1.2 measurable rather than latent.
The drawn curve is not exactly on its circle either. The approximation is exact at each segment's
endpoints and midpoint, so with four quarter-turn segments the x-extremes land on an endpoint at the
default start angle and on a midpoint at 45 degrees, and both are exact. Off those, the worst case
over a sweep of start angles is 0.0409pt past the nominal edge at diameter 300, near 19.5 degrees.
The generated chart keeps the default start angle, and that is load-bearing rather than incidental.
Evidence
content streams, each row carrying a text-run count so a difference says whether text moved or was
lost. Six rows differ and every one keeps its count. They are the chart under Left and Right at a
diameter equal to the content box, the image under Centre and Right at a width whose own margins
put it left of the box, a bullet list with a 3pt indent, and a roman list whose markers genuinely
exceed the indent. Every other row is identical, including the documents review identified as
moving under the earlier design.
failures in Debug and twice in Release with different property seeds. The 319 skips are the
external oracle tools this machine does not have.
fail with the pre-fix number. That pass is what found the
Width = 300.0001row asserting a 5e-5defect against a 0.001 tolerance, and the alignment arms of both switches surviving being zeroed.
PaginationDepthTestspins aDiameter300 chart on a200x200pt page; the reservation becomes 192 against a 180pt content area, so it still refuses.
Two defects review found in the fixes themselves
Worth listing rather than burying, since both were in code I wrote in response to an earlier round.
The position clamp wrote
boxX + width - content, which C# left-associates. Where the content nearlyfills the box that subtraction cancels catastrophically and lands below
boxX, soMath.Clampgetsa maximum below its minimum and throws. The property suite found it with generated margins, at a
maximum of 49.25926 against a minimum of 49.25924. Parenthesising the difference fixes it, and it is
the same association hazard a comment one method away had just been rewritten to describe.
A scripted edit wrote CRLF into three source files, which would have failed the format gate.
Normalised, and carriage returns are now counted after any scripted write.
Corrections carried in this branch
Twenty-nine sentences across the comments and the changelog claimed more than the tree supports, and
three review rounds found them. The largest were an argument that a fitting line is safe because
equal operands give positive zero, which covers only the equal case; a claim that the arc bulge is
zero at the quadrant points, which states the wrong mechanism and is false at 45 degrees; and a
nested-gutter justification that fails at larger font sizes. Each is now either measured or states
its limit.
Refs #365