Reduce vertical gap between guitar chords and lyrics text #23

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

Description

The vertical distance between guitar chords and the lyrics text below them is too large. Chords should sit closely above their associated lyrics, but currently the gap makes the visual connection between chord and text weak.

The gap is controlled by config.layout.chordLineSpacing (default: 3mm, converted to ~8.5 PDF points in ChordLyricRenderer.kt:27). This default value is too generous and should be reduced.

Acceptance Criteria

  • The default value of chordLineSpacing is reduced so chords sit closer to their lyrics (e.g. 0.5–1mm)
  • The change is reflected in both the renderer (ChordLyricRenderer) and measurement engine (MeasurementEngine) consistently
  • Existing tests pass (update expected values if needed)
  • The rendered output shows chords visually close to their associated lyrics

Relevant Code

  • model/.../BookConfig.ktLayoutConfig.chordLineSpacing default value
  • renderer-pdf/.../ChordLyricRenderer.kt:27 — converts chordLineSpacing mm → points
  • layout/.../MeasurementEngine.kt:60-62 — uses chordLineSpacing in height calculation
## Description The vertical distance between guitar chords and the lyrics text below them is too large. Chords should sit closely above their associated lyrics, but currently the gap makes the visual connection between chord and text weak. The gap is controlled by `config.layout.chordLineSpacing` (default: **3mm**, converted to ~8.5 PDF points in `ChordLyricRenderer.kt:27`). This default value is too generous and should be reduced. ## Acceptance Criteria - [ ] The default value of `chordLineSpacing` is reduced so chords sit closer to their lyrics (e.g. 0.5–1mm) - [ ] The change is reflected in both the renderer (`ChordLyricRenderer`) and measurement engine (`MeasurementEngine`) consistently - [ ] Existing tests pass (update expected values if needed) - [ ] The rendered output shows chords visually close to their associated lyrics ## Relevant Code - `model/.../BookConfig.kt` — `LayoutConfig.chordLineSpacing` default value - `renderer-pdf/.../ChordLyricRenderer.kt:27` — converts `chordLineSpacing` mm → points - `layout/.../MeasurementEngine.kt:60-62` — uses `chordLineSpacing` in height calculation
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shahondin1624/songbook#23