Skip to content

docs(docx): say in the capability matrix what the DOCX export carries - #913

Merged
DemchaAV merged 1 commit into
2.5-devfrom
docs/docx-capability-matrix
Oct 18, 2026
Merged

DemchaAV merged 1 commit into
2.5-devfrom
docs/docx-capability-matrix

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

The DOCX column of docs/architecture/backend-capability-matrix.md described an export this
repository no longer has. It said the backend "deliberately ignores fixed-layout geometry",
marked font portability ❌ ("nothing is carried"), external hyperlinks ❌ and deterministic
output ❌, and said "an anchor on a node the export drops (a shape, a barcode) has nothing to
mark". The code says otherwise for each, so a reader choosing a backend from the matrix was told
the DOCX export cannot do what it does.

What changed

  • Intro. The export walks the node tree and writes editable Word content; it reads the
    resolved layout, when it has one, for how tall a line is, how wide a column came out and
    where a drawing stands (applyLineHeight, DocxLayoutMetrics.tableColumns, the drawings'
    own fragments), linking the recipe's "Measured geometry".
  • Font portability ✅ DocxFontTable + DocxFontEmbedding: a bundled or registered family
    the body, a page zone or a header band names is carried in Word's font table, only the faces
    its styles name, each obfuscated against a key derived from the font; whole faces, no
    subsetting. A face whose OS/2 fsType forbids embedding or allows reading and printing
    only, and one that cannot be read, is named but not shipped (embedded font). Standard-14
    names carry no binary.
  • External hyperlinks ⚠️ DocxSemanticBackend.newRun: a paragraph's, a run's, a
    picture-in-a-line's and a page zone picture's link is a w:hyperlink with an external
    relationship, a run's own link winning over its paragraph's. A block written as a picture, a
    drawing or a rule, and a table, carry none, and the report names the link — the deviation the
    ⚠️ marks.
  • Internal links ✅ → ⚠️ for the same blocks. The anchor sentence is replaced: a barcode's
    and a rule's anchor are bookmarked (blockAnchorOf); a drawing floated over the text, a
    stack's layer written as a column and a page zone's paragraph or picture hold no bookmark, and
    the report names the anchor; a page reference to one is the number the layout found.
  • Deterministic output ✅ DocxDeterminism, through DocxSemanticBackend.builder() .deterministic(true) or deterministic(Instant); an embedded font's obfuscation key is
    derived from the font, so it needs no pinning.
  • CHANGELOG.md, v2.5.0 Documentation: one entry.

Verification

  • Each changed cell was checked against the code, sentence by sentence, with file:line
    evidence (newRun and its callers, carriedWithout, the rule and barcode notes,
    blockAnchorOf, DocxFontTable.resolve/addFace, DocxFontEmbedding.permissionOf,
    DocxDeterminism, the builder).
  • Architecture and documentation guards (EnginePdfBoundaryTest, DocumentationCoverageTest
    and the rest of CI's list, -pl :graph-compose-core) — BUILD SUCCESS, 83 tests.
  • Knowledge checks: check-claims --check, check-routes, check-stability-doc pass.

Lane: docs — the capability matrix and the changelog; no code change.

The matrix's DOCX column said the export ignores the layout's geometry,
carries no font, writes no external link and no reproducible bytes, and
that an anchor on a shape or a barcode marks nothing.

The export reads the layout, when it has one, for how tall a line is,
how wide a column came out and where a drawing stands. It ships the
faces its styles name in Word's font table, and names a face whose
licence keeps it out or that cannot be read. It writes the link of a
paragraph, a run, a picture in a line and a page zone's picture as a
w:hyperlink, and names the link on a block it holds as a picture, a
drawing, a rule or a table, which is why both link rows are now marked
degraded. It pins its clocks under deterministic(true). It bookmarks a
barcode's anchor and a rule's, and names the anchor of a drawing floated
over the text, of a stack's layer written as a column and of a page
zone's paragraph or picture.
@DemchaAV
DemchaAV merged commit e6a90e8 into 2.5-dev Oct 18, 2026
11 checks passed
@DemchaAV
DemchaAV deleted the docs/docx-capability-matrix branch October 18, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant