diff --git a/CHANGELOG.md b/CHANGELOG.md index 187b07f5..94d779e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/docs/templates/v1-classic/authoring.md b/docs/templates/v1-classic/authoring.md index 4dbb95c2..ee5d9e38 100644 --- a/docs/templates/v1-classic/authoring.md +++ b/docs/templates/v1-classic/authoring.md @@ -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 @@ -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 -> {