Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,13 @@ follow semantic versioning; release dates are ISO 8601.

### Documentation

- **The authoring cheatsheet stops describing `lineSpacing` as a multiple.** Its
address-block recipe passed `1.3` and explained it as overriding a default of `1.0` —
the reading a CSS `line-height` invites, and the one the number itself suggests.
`lineSpacing` is extra space in **points**, defaulting to `0`: a paragraph grows by
`(lines - 1) × spacing`, so `1.3` bought a little over one point of air rather than
30% more leading, and there was no `1.0` default to override. The recipe now passes a
value that does what the prose beside it promises, and the page states the unit.
- **The chart recipe documents the styling surface it has.** Five settings were named
nowhere on the page — the three text styles, the donut centre style and the bar width
ratio — four of them already load-bearing in the flagship examples that put a chart on
Expand Down
13 changes: 10 additions & 3 deletions docs/templates/v1-classic/authoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,22 @@ you cheap forks. To brand for your project, hand-build a
The soft panel sits flush against the accent stripe — round only the
**right** corners so the join is clean.

### 6.2 Address blocks with `lineSpacing(1.3)`
### 6.2 Address blocks with `lineSpacing(3)`

```java
.addParagraph(p -> p.text(joinAddress(party))
.textStyle(theme.text().body())
.lineSpacing(1.3) // default 1.0 squashes \n-joined lines
.lineSpacing(3) // 3pt of air; the default 0 packs \n-joined lines
.margin(DocumentInsets.zero()))
```

`lineSpacing` is **extra space in points**, not a multiple of the font size:
the paragraph's height grows by `(lines - 1) × spacing`. The default is `0`,
so an address joined with `\n` renders on consecutive baselines with no extra
gap between them — the font's own line height and nothing added. Two or three
points is usually enough to separate the lines without opening a gap that
reads as a paragraph break.

### 6.3 Two-column block via `addRow` with weights

```java
Expand Down Expand Up @@ -337,7 +344,7 @@ public final class StatusReportTemplateV1 implements StatusReportTemplate {
.addParagraph(p -> p.text("Summary").textStyle(theme.text().h2()))
.addParagraph(p -> p.text(spec.summary())
.textStyle(theme.text().body())
.lineSpacing(1.3)))
.lineSpacing(3)))

// Metrics table — themed header + zebra + total row + repeating header
.addTable(table -> {
Expand Down