Repository navigation
v2.5.2 — 2026-11-26
- Side-by-side text on a simple canvas of shapes and paragraphs lands in Word where the PDF puts
it. - A Mint Editorial CV with a header band now fits on two pages in Word, as in the PDF.
- Large tables export to Word about 1.5× faster, and with less memory.
- A PowerPoint deck in your own single-file font exports faster.
- PowerPoint's warning about a font the deck does not carry now comes once per family.
No API changes: a drop-in upgrade from 2.5.1. The entries below give the detail.
Fixed
-
A DOCX canvas that places its text side by side or out of reading order sets it where the
page does.- A canvas (
addCanvas,CanvasLayerNode) was written as its contents: its drawings stood
where it placed them, and its text one block under another from its corner. A canvas that
places its text side by side or out of reading order came out with its text stacked at its
left edge. OnTwinOutputExample's 960 by 540pt page, which is one canvas, Word 16 set every
one of its 43 lines, and LibreOffice every one it set, as much as 820pt across and 222pt down
from where the page sets them. OnMavenBannerPptxExample's first page the caption went to
the second page and took the four pages after it one page later. - Such a canvas in the body's flow is now written over its page, as a block laid over the flow
already is: its drawings stand where the page draws them, each paragraph in a text box where
the page sets it, and the flow holds the canvas's room. Where the canvas opens a page, the
room is a line of its own, whose height Word and LibreOffice keep at a page's top where they
drop a paragraph's space above: owed as that space, the paragraph under a canvas moved to a
new page stood 139.8pt high in both, and within 0.3pt held in the line. A canvas alone on its
page — a cover, a page of a deck — holds its room in such a line too, which carries its text
boxes there: with nothing else written on its page they were dropped, or carried by a page
break's paragraph at the page's top, where Word set a box within that paragraph's line 7pt
high. A page break right after the line goes in it, or its own paragraph would stand on the
next page and break it again; where the next page is set against other margins, the section
break that starts it takes that page break's place, as it takes the place of the one in a
page break's own paragraph. Elsewhere the room is owed as space to what follows, and nothing
is written where nothing follows. Measured by baseline against the
engine's PDF in Word 16 and LibreOffice 26.8:TwinOutputExample's 41 lines that both
editors break as the page does within 0.6pt, and the banner's first page within 0.7pt with
its caption back on it and five pages in both. One paragraph ofTwinOutputExample, set at
12.3pt, is written at 12.5pt — a Word file holds a size to the half point — and breaks a word
sooner in both. - A canvas whose blocks read down — each starting at or below the foot of the one before,
however far across — stays in the flow and is written as its contents as before, where a
reader of the flow reaches its text: a CV's name over its title is that, as in
MintEditorialwith a header band. It keeps each block as far down as it places it (see
"A DOCX canvas whose text reads down keeps each block where the page sets it down"); how far
across is still not carried, and the report names it. - Only a canvas holding nothing but drawing and plain paragraphs on one page is, as for a block
laid over the flow: a link, a bookmark, an anchor, a picture, a table, a list, a spacer, a
chart, a barcode, a row, a nested canvas or a transformed block it holds keeps it written as
its contents, and so does a canvas spanning two pages, or in a table cell, a painted panel, a
band, another overlay or a stack of one layer. The report names each as before. - Text in a text box stands outside the document's flow: each box is anchored in a paragraph
near it and moves with that paragraph, but what is typed into it moves nothing round it, and
a reader of the flow alone does not reach it. The report names each such paragraph.
- A canvas (
-
A DOCX canvas whose text reads down keeps each block where the page sets it down.
- A canvas written as its contents (
addCanvas,CanvasLayerNode) wrote what it holds one
block under another from its corner, and owed under the last the room its height left below
that stack. Where it placed a block lower than the foot of the one before, the distance was
lost, and where its corner stood higher than Word sets its first block — a canvas pulled up by
a negative top margin — the room owed below was too large by that much.MintEditorialwith a
header band, a canvas pulled 48pt up to the page's top edge with its name 48pt down it and its
title 3pt under the name, set its title 2.9pt high in Word 16 and 3.3pt high in LibreOffice
26.8, its rule 3pt high, and owed 48pt more room under the masthead than the page holds: the
row under it no longer fitted the first page, and the CV took three pages in both where the
page takes two. The paired cover letter's lines stood 48pt low. - A canvas whose blocks read down — each starting at or below the foot of the one before — now
sets each as far below the one before as it places it, the first as far below its corner,
and owes the room it leaves under the foot of the last. A negative top margin's pull comes out
of the space above its first block, so a table first stands where the page sets it too; on a
page the canvas opens, the line holding its top edge holds that space. Measured by baseline against the
engine's PDF: the bandedMintEditorialCV is two pages in both editors, its 102 lines within
0.24pt in Word 16 and 1.3pt in LibreOffice 26.8 — as the CV without a band measures — and its
rule where the page draws it; the banded cover letter's lines, 48pt low, are within 0.18pt and
1.3pt. - How far across it places them is still not carried: such a canvas writes its blocks at its
left edge, and the report names one that places a block elsewhere. It also names a block placed
higher than the foot of the one before, or than the canvas's corner, which Word sets at that
foot or corner; a first block that a negative top margin pulls up further than it places it
below the corner (for a paragraph first, further than the space owed above the canvas too),
which Word sets up to that much lower; and, for a canvas pulled up past the page's margin that the layout moves to a new
page, the space above its first block where a paragraph opens that page with it, which Word
drops there. A table, a row or a panel first holds that space in a line of its own.
- A canvas written as its contents (
-
A DOCX paragraph in a family given up for a shared Word name reads the holder's line in whichever
case it spells the name.- A family whose
wordFamily()asks for a name another family already ships a face set under is
given up, and its runs are set in the holder's faces — where a run spells the name in another
case too: measured in Word 16 on a document declaring the name once, runs spelled in upper and
in lower case were drawn from the holder's program, at its width and on its line. Where the
editor has a font of that name itself, its own font wins, as before. - The line each shipped face is set in was kept under the exact spelling, so such a run read no
line, and its paragraph was held to an exact height where one spelling the name the holder's
way could grow to a least one, as it does for two registrations of one face: Lato Regular at
14pt wrote336 atLeastforFoldSharedand336 exactforFOLDSHAREDandfoldshared. - The line is now kept under the name matched without case, the way
DocxFontTabledecides that
two families share one. So a run naming a shipped name in another case reads that face's line
— a given-up family's, or one that shipped nothing of its own — where the face fills the slot,
and none where it leaves the slot empty. LibreOffice was not measured on this shape.
- A family whose
-
A PPTX font the deck does not carry is announced once, and by what the registered families carry under its name.
- The
render.pptx.font.substitutionlines for a registered family were written per
registration, so a family registered twice was announced twice; the module README promises one
line per family per render. They are now written once per family name, after the last
registration has been read, and the last registration of a name decides the line — the one
whose viewer family the runs are written with and whose program the page was measured in. - Which line a family gets was decided by the family alone, so a deck carrying a program under
the family's viewer name from another registered family could be told the opposite. A family
registered without binary sources beside a binary one declaring its name withwordFamily(...)
was toldno program for "Brand" travels with the deckwhile one did. A family whose font only one of
the backend's two readers accepts, sharing a viewer name with one that travels, was told it
needs its font installed when it was registered first and that its text is drawn from the
other program when it was registered second — for two byte-identical decks. A bundled family
the render was told not to carry, drawn beside a registration declaring its name, was told the
deck references it by name only. - Every such family, where the carrier is another registration, now gets the line that says its
text is drawn from the program that travelled under the shared viewer family, whatever the reason it is not carried and in either
order of registration; a face that was refused is still named, with the reason, by
render.pptx.font.embed.skipped, once per registration. A family whose viewer name nothing
else carries keeps a line of its own. Only the log changed: a deck rendered for each of these
arrangements, in both orders where there are two registrations, is the same bytes before and
after. - The carrier has to be another registered family. A registration declaring a bundled
family's name, and not carried itself, is still told it needs its font installed when the
bundled program travels under that name, because the bundled families are carried after the
last slide and the registered families' lines are written before the first. A family name
registered again without sources, after a registration of it that travelled, is likewise told
only what its last registration lacks.
- The
-
A PPTX font the deck carries nothing of is told so.
- A registered or bundled family the deck could not carry was told
"X" is not carried whole,
which is worded for a deck holding part of the family. Every refusal a font can provoke —
a face that cannot be read, licence bits that forbid embedding, a header the presentation
could not read back, two of the family's faces reading back as one style slot, and for a
registered family its viewer metrics — arrives before the presentation is handed a face, and
leaves nothing of the family in the deck. Such a family is now toldno face of it travels with the deck, and what its text needs. A family whose declared name another registered
family carries a face under keeps the line saying its text is drawn from that program, whatever
refused it. not carried wholestays where something of the name is in the deck: an earlier registration
of the same family name travelled and its last one did not, or the presentation refused a face
it had been handed, which only POI's own part store can do. On every path a font can reach,
only the log changes: what a deck carries is unchanged.
- A registered or bundled family the deck could not carry was told
Performance
-
A PPTX deck reads a registered font's viewer metrics from each font file once. The deck it
writes is the same bytes.- Before a slide is drawn, the export reads the ascent of each of a registered family's four
faces throughFont.createFont. It read each slot's file afresh, so a family registered from
one file, which fills all four slots with it, was parsed four times. Each file is now read
once, keyed by its source's description, as the font programs read beside it are. - Measured outside the build, logging quiet, a family registered from one file: the metrics read
took Cousine (301 KB) 9.8 → 2.3 ms and Gothic A1 (2.2 MB) 26 → 5.9 ms; a one-page deck in
that family, median of 400 exports in each of two alternating rounds, 51–54 → 43–45 ms and
131 → 111–112 ms. A family registered from four files reads four files, as before. - Measured byte-identical: every part of six decks — a family from one, two and four files, two
registered families, and a bundled font alone.
- Before a slide is drawn, the export reads the ascent of each of a registered family's four
-
A large table's DOCX export no longer reads its rows quadratically, nor makes XMLBeans throw
for every colour. The file it writes is the same bytes.- POI's
XWPFTable.getRow(int)andgetNumberOfRows()count the table's rows on every call, and
the export read each row that way several times while writing it, so the reads grew with the
square of the table's rows. The rows are now read from POI's own list of them, in the passes
that write a table's rows. - A Word colour attribute (
w:color,w:fill) holds either the wordautoor three hex bytes.
Given a colour as a hex string, XMLBeans tried it as the word first and threw and caught an
XmlValueOutOfRangeException, stack trace included, for every colour that is notauto—
four for each ruled cell. Every such attribute the export sets to a colour — on borders,
shading, a run, the Normal style, a timeline rail — is now given its bytes, which XMLBeans
writes as the same upper-case hex. - The passes that count the lines written at an exact height and fill the shaded spaces closing a
paragraph asked each paragraph and run for a few of its children through an XPath of its own;
they walk the children now. - JMH
DocxExportJmhBenchmark,-prof gc, allocation per export, the mean of two runs:
table1000233 → 159 MB,report2010.1 → 9.5 MB,small1.87 → 1.68 MB,images20
2.99 → 2.92 MB. Time was measured on a machine other builds were loading, so as pairs: run
alternately, one fork of each build a round,table1000was faster in three rounds of four
(median 1,496 → 476 ms/op), and its thread CPU time per export in the quietest round went
688 → 500 ms; the smaller shapes move within the noise. - Measured byte-identical: the 105 documents of the DOCX fidelity corpus, every part of each, with
the same 1,718 report notes; and the benchmark's four documents, every part but the creation
time indocProps/core.xml. - Measured again against the published 2.5.1 with a plain harness, not JMH, on a machine with
other work running: the benchmark'stable1000,report20andsmalldocuments, each built
and exported in a fresh session, logging quiet, the median of 25 runs, each timed from building
the session to closing it, after 15 warm-ups, in two alternating rounds.table1000took 722
and 680 → 463 ms and allocated 232–233 → 155–157 MB on its thread;report20allocated 10.3 →
9.5–9.6 MB andsmall1.91 → 1.71 MB, their time within the noise. The same three documents'
PDF export did not move:table1000took 59–63 ms before and 58–62 ms after, and allocated
24–25 MB on both builds.
- POI's
Internal
- The PPTX backend's internal javadoc says what a render built with
embedBundledFonts(false)
is warned about. It said such a render must not be told to register what it declined. It is
told: a bundled family it draws in that ships a binary and is not registered gets the name-only
warning, which points atregisterFontFamily, because a family registered with binary sources
goes to the embedder whatever that flag says. (Where a registered family carries a face under
the name its runs are written with, the line says instead that its text is drawn from that
program; see "A PPTX font the deck does not carry is announced once" above.) A test now follows
that advice on such a backend and finds the family carried and no longer reported.
TemplateTestSupport.assertPdfUsesFont, which nothing called, is removed from theqatest
sources. PptxRenderEnvironmentno longer carries the PPTX backend's font embedding. Embedding had
grown into most of the class (1,426 lines), and now lives in package-private classes beside it:
PptxDeckFonts(which families a render carries, the viewer family a run is written with, and
therender.pptx.font.substitutionlines),PptxFontEmbedder(reading a family's faces,
refusing it whole, handing the programs to the presentation, with theembed.skippedlines that
say why a face did not travel and theshared.familyandname.mismatchlines about what it
noticed on the way),PptxSlotLedger(which face holds each style slot of a declared viewer
family) and thePptxFontFaceenum the first two share. The environment keeps every public
method; the font ones delegate. No behaviour changes: decks rendered withdeterministic(...)
are the same bytes, and the render log carries the same lines in the same order.DocxFontTableis split in four. The class (868 lines, now 477) keeps the font table
itself — which faces the document asks for, which family keeps a declared name and the refusal
of the one that does not, and the parts and XML it writes — and three package-private classes
beside it take the rest of what it held:DocxShippedLines(the line an editor
sets each shipped face in, formerlyDocxFontTable.ShippedLines),DocxFontFaces(a family's
faces: the slot each fills, reading each one's file and terms, and the note on a face an editor
will not draw) andDocxTypeface(the typeface a program states). The font lines are logged
under the same category as before. No behaviour changes: the 105 documents of the DOCX fidelity
corpus are the same bytes, with the same report notes. The shared-name cases of
DocxFontTableTestmoved toDocxSharedFontNameTest, and the helpers both use to
DocxFontTableFixtures.- The render backends' CodeQL alerts are cleared. 23 of the 38 open in
render-docx,
render-pdfandrender-pptxare cleared in code: a never-read local in the DOCX writer (its
call, which owes the canvas's space, kept), a javadoc block moved back onto the method it
describes, private overloads that dispatched on the argument's static type renamed
(twipsOf(CTTblWidth),holdsText(DocumentNode),PdfTrackedFontView.widened(COSBase)),
@OverrideonPdfFont, the tiled watermark's loop bounds made explicit (Java already widened
the float position to compare it with the double canvas size; the bytecode is the same), an
unused private parameter, and four test files — among them a PPTX test helper that took a
filter argument it never used. The other 15 are left: type-test chains over the node kinds the
DOCX writer handles (a kind it does not know takes its fallback) and over the sealed
ShapeOutlinepermits,parseInton text a pattern has already matched as hex, and tests parsing what
the exporter wrote. No behaviour changes: the 105 documents of the DOCX fidelity corpus are the
same bytes, with the same report notes. - The core module's CodeQL alerts are cleared. 21 of the 43 open in
coreare cleared in
code: two never-read locals inLayoutCompiler, unused parameters of five private methods, a
fallback in the row's weight split that testedn > 0inside a loop overn, a string compared
by reference whereequalsgives the same answer (the Arabic shaper returns the same string when
it changes nothing), an unqualifiedsize()inBoundedLruCache's
eviction hook spelledthis.size(), a Lombok@NonNullonStrokeColorwhose check ran only
after the argument was already dereferenced,@OverridewhereFontBase,ImageBuilderand
DividerBuilderoverride (theFontBasegetters Lombok generated are now written out, so they
carry it), andTocBuildercallingRowBuilder.spacingover the deprecatedgap. The other 22
are left: record-component@paramtags that CodeQL matches against generated members,
parameters of interface methods that implementations are handed (NodeDefinition, the beta
node SPI, and the internalResolvedLayoutPass), records whose lists are an immutable
copy or shared on purpose, a type-test chain over the sealedShapeOutlinepermits,
parseIntover the constant table of SVG colour names, a test helperqauses through the
core test jar, tests parsing text a pattern has already matched, and four Lombok builders whose
generatedtoString()prints aDocumentColororDocumentPageNumbering, which have no
toStringof their own; giving them one is new public API and changes what every value
holding one prints. No behaviour changes: the 105 documents of the DOCX fidelity corpus are
the same bytes, with the same report notes. - The templates module's CodeQL alerts are cleared. 28 of the 48 open in
templatesare
cleared in code. The CV, invoice and proposal presets and a receipt component made 24 calls of
the deprecatedRowBuilder.gap, which only passes the value on tospacing: 19 now call
spacing, and 5 that followed aspacing(0)withgap(0)on the same row are dropped. A
javadoc block that a removed method left inTerracottaRailWidgetsis removed too. Two private
methods lose a parameter they never read, along with the widthMonogramSidebarcomputed only
to pass to one of them. The other 20 are left: tests that pin a deprecated method on purpose
(TextOrnaments.spacedUpper, the three-argumentBrandThemeconstructor and
CvDocument.ofMainSections, each kept until a major release removes it), a record whose lists
are an immutable copy, andparseDoubleon the viewBox of the icons the Orange Ops CV preset
packages, read only for a token checked against that set. No behaviour changes: the 105
documents of the DOCX fidelity corpus are the same bytes, with the same report notes, and the
qalayout snapshots and pixel baselines of the presets do not move.
Build
- The post-release showcase restore in
cut-release.ps1passes its--to git. PowerShell
reads a bare--in a call to one of its own functions as the end of that function's
parameters and drops it, soInvoke-Git checkout -- web/showcaseran
git checkout web/showcase. With no branch or tag of that name it restored the paths as meant;
with a branch of that name it switches to it, with a tag it detaches at it, and either way the
re-rendered previews stay in the tree. The call now passes'--'quoted, which arrives intact;
it was the only call to a function of the script that passed a bare one.
ReleaseScriptGitExitCodeGuardTestrefuses a bare--in any call toInvoke-Git, and a new
step ofrelease-script-check.yml, A pathspec separator reaches git, refuses one in a call
to any function the script defines, and runs the restore in a repository holding a branch named
web/showcase: the files come back and the branch stays where it was. - A pull request that changes the Maven the release smoke runs on now runs the staged smoke.
The provenance steps ofrelease-script-check.ymlfeed the check records written by hand, so
they pin the format the check knows: the move to Maven 3.10, which records the staged
repository asstaged-<sha1>instead ofstaged, surfaced only on the 2.5.0 cut. The new
release-smoke-staged.ymlruns on a pull request that touches.mvn/,mvnw,mvnw.cmdor
scripts/release-smoke/. It stages the published train of the versionrun.shsmokes by
default — resolved from Central by the repository's own wrapper and copied out as jars, POMs and
.sha1files, the shape of the unzipped bundle — and runsrun.sh --staged-repoagainst it on
Linux, so the records the check reads are the ones that Maven writes. While a cut is between its
release commit and Central the version is not published, and the job skips the smoke with a
notice. A scenario must now pass against the published versionrun.shnames on every such
pull request, not only at the cut. - The JMH benchmarks in
benchmarks.jarrun with quiet logging. Only the manual harness
appliedlogback-benchmark.xml; a forked JMH JVM found no Logback configuration, fell back to
Logback's default and printed every engine DEBUG line to the console — 32.8 MB of output for one
CanonicalRenderfork, 22.2 MB for the fourDocxExport.docxshapes. Every JMH benchmark now
extendsQuietJmhBenchmark, whose static initializer applies the manual harness's quiet
configuration and initializes Logback before the fork loads anything that logs, so Logback's
start-up is outside every measured region; the same two runs print 6 KB and 19 KB. The logging
was inside the measured region:CanonicalRenderallocated 333 172 B/op with it and
273 169 B/op without, eachColdStartshot 12.5–13.2 % less, and thetable1000shape of
DocxExport.docx4.8 % less; the other three shapes moved within their error. JMH results
recorded before 2.5.2, the weeklybenchmarks-jmh.ymlseries among them, are not comparable
with later ones.-jvmArgsAppend "-Dgraphcompose.benchmark.logging=debug"keeps the engine's
logging, as-Dgraphcompose.benchmark.logging=debugdoes for the manual harness.
JmhQuietLoggingGuardTestreadsMETA-INF/BenchmarkList, the list the JMH runner reads, adds
the@Stateclasses the benchmarks take and every@Stateclass of the package, and fails for a
class whose initialization leaves the engine's loggers at DEBUG.