Repository navigation
v0.24.0
Parallel flex-row fragmentation, and the results of a systematic sweep for values the engine computed and never read.
Changed: these move existing documents
Six fixes make declarations take effect that were previously discarded, or apply a CSS rule the engine had wrong. If a document relies on any of them, its layout will change, and that is the point.
max-width/min-widthon a text block with no border, padding or background. A leaf text node honouredwidthand ignored the min/max family, so<p style="max-width: 315pt">ran the full column. Eight of the thirty shipped template images move because of this alone: the Northmoor set's prose-measure classes (.intro,.measure78) were inert and now are not. Affects the JSX path equally, through<Text style={{ maxWidth }}>word-spacingis part of text measurement. It was applied only at PDF-write time through theTwoperator, so lines were broken as though it were zero and then drawn wider, so text could run past its container. Lines now break where a browser breaks them- Print media queries evaluate against the page CONTENT box. They briefly evaluated against the page box, on an unverified claim that a browser agrees. Measured, Chrome matches none of Bootstrap's
768/992/1200breakpoints when printing A4 or Letter, and neither does Forme now. A Bootstrap.containerthat took a desktop width and overran the page no longer does - A stretched column paints its band on every page the row crosses. Under
align-items: stretch, a column whose content ended before its neighbour's painted nothing on later pages; a browser continues the band - A fixed-height box that does not fit fragments instead of vanishing. A breakable
Viewwith a fixedheightthat did not fit in the remaining space lost that height entirely: with a background it was drawn at content height, with none it was not drawn at all, and everything below it moved up by the difference. No page break, no warning. It now fragments across the boundary the way a browser does, measured: a 500pt box starting 600pt down a 733.9pt page paints 134pt on that page and 366pt on the next. This was corrupting one of the shipped demo templates, whose baseline had recorded a footer with no position at all - An auto-width block fills, and its auto margins are zero. CSS 2.1 10.3.3: a block-level box in normal flow with
width: autofills its containing block, and anyautohorizontal margin computes to zero; auto margins only center a box whose width is constrained, whichmax-widthstill does. Forme shrank these to fit and centered them. Bootstrap's.containeris again the shape that suffers, for the same reason as the media-query fix above and with the opposite symptom: with its width absent when printing it is exactly an auto-width block, so it collapsed to its own padding, and its percentage-width children then measured against nothing. If you relied on an auto-width block centering, give it amax-width
Added
- Parallel flex-row fragmentation. A
flex-direction: rowthat crosses a page now continues as parallel columns on each page, instead of laying its children out sequentially. This includes wrapped rows (flex-wrap: wrap), so the render defect that used to report the sequential outcome is gone along with the outcome. A row that crosses no longer relocates whole either: it starts in the space that is there, and the slivers the old relocation guard prevented are now prevented per column, by each column's own widow/orphan control word-spacingin the HTML CSS subset, block-level, withem/rem<html lang>reaches/Lang. The attribute was parsed and never read, so a PDF/UA file could carry a language contradicting its own content while the warning told the author to set the attribute they already had.langprecedence is now uniform on every render: an explicit option, then the document's own declaration, then"en"with a warningemandremongap,border-radiusandborder-width, which parsed correctly and did nothing.border: 0.5em solidpainted at themediumdefault rather than the width asked for
Fixed
- Render warnings reach every surface.
renderTemplateWithLayout()reported "warnings: none" on every render since it shipped, andforme devserved a complete warnings badge that nothing populated. Font-embedding warnings underpdfUa, missing glyphs, clamped table columns and sequential row splits were all silent on those paths - A border no longer cancels the rest of an element's style. A paragraph with a border, padding or background lost roughly fifteen other properties, among them
border-style,text-transform,letter-spacing, orphan and widow control,positionand its offsets, andvertical-align - Per-side border colours on the HTML path, which collapsed to one colour
- Inline elements keep their background, padding and border
dir="rtl"as an attribute now reaches the engine's BiDiborder-stylewith no explicit width paints, per CSS'smediuminitialborder-collapseis honoured ondisplay: tableelements- A table whose fractional columns sum to exactly 1.0 no longer reports itself as clamped.
0.6 + 0.4of the available width left a float remainder of about 3e-14, negative at some widths, so half of those tables reported themselves over-full. The threshold is now a hundredth of a point
Internal
- The docs gallery freshness gate now verifies which engine build produced the images. It hashed the source and rendered with the binary without checking they corresponded, so a stale build satisfied it completely. 27 of 30 images were stale when that was finally measured
- Byte-wall fixtures for the box/text split, relative units, word-spacing and fragmented columns. Each was verified to fail before being trusted
- The SDK WASM rebuild is unconditional in
RELEASE.md. Conditional on "ifengine/changed", it was a judgement call whose failure is silent: an SDK keeps a stale WASM and its byte-parity test still passes, against a JS package that has moved