Song verses are not visually separated by spacing #24

Closed
opened 2026-03-17 14:37:52 +01:00 by shahondin1624 · 0 comments

Description

Song stanzas/verses are not visually separated from each other in the rendered PDF. There should be a clear vertical gap between sections (verses, choruses, etc.) so readers can easily distinguish stanza boundaries.

The configuration config.layout.verseSpacing exists with a default of 4mm, applied in PdfBookRenderer.kt after each section. However, the rendered output does not show adequate separation between stanzas. This may be caused by:

  1. The verse spacing not actually being applied in rendering (possibly broken by recent overflow/split changes in PR #20)
  2. The spacing value being too small to be noticeable
  3. A rendering bug where the spacing is calculated but not reflected in the Y position

Acceptance Criteria

  • Consecutive song sections (verses, choruses, bridges, repeats) have clear visible vertical spacing between them in the rendered PDF
  • The verseSpacing configuration value is correctly applied after each section during rendering
  • The spacing is consistent between the measurement engine and the renderer
  • Existing tests pass (update expected values if needed)

Relevant Code

  • renderer-pdf/.../PdfBookRenderer.kt — verse spacing applied after section rendering
  • layout/.../MeasurementEngine.kt:70-71 — verse spacing in height calculation
  • model/.../BookConfig.ktLayoutConfig.verseSpacing default (4mm)
## Description Song stanzas/verses are not visually separated from each other in the rendered PDF. There should be a clear vertical gap between sections (verses, choruses, etc.) so readers can easily distinguish stanza boundaries. The configuration `config.layout.verseSpacing` exists with a default of 4mm, applied in `PdfBookRenderer.kt` after each section. However, the rendered output does not show adequate separation between stanzas. This may be caused by: 1. The verse spacing not actually being applied in rendering (possibly broken by recent overflow/split changes in PR #20) 2. The spacing value being too small to be noticeable 3. A rendering bug where the spacing is calculated but not reflected in the Y position ## Acceptance Criteria - [ ] Consecutive song sections (verses, choruses, bridges, repeats) have clear visible vertical spacing between them in the rendered PDF - [ ] The `verseSpacing` configuration value is correctly applied after each section during rendering - [ ] The spacing is consistent between the measurement engine and the renderer - [ ] Existing tests pass (update expected values if needed) ## Relevant Code - `renderer-pdf/.../PdfBookRenderer.kt` — verse spacing applied after section rendering - `layout/.../MeasurementEngine.kt:70-71` — verse spacing in height calculation - `model/.../BookConfig.kt` — `LayoutConfig.verseSpacing` default (4mm)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shahondin1624/songbook#24