From 887b1b8d2e57ccd5a525f038dfc4641e6eb6dc60 Mon Sep 17 00:00:00 2001 From: Heiko Joerg Schick Date: Sun, 10 Aug 2025 20:59:25 +0200 Subject: [PATCH] Fix overlapping text on card backs by increasing line spacing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Increased line height from 3.8 to 9.5 points for the small text at the bottom of card backs to prevent text overlap when song titles and artist names wrap to multiple lines. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- generate_hitster_cards.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generate_hitster_cards.py b/generate_hitster_cards.py index fa3a2f8..5bd6ae1 100644 --- a/generate_hitster_cards.py +++ b/generate_hitster_cards.py @@ -193,9 +193,10 @@ def draw_card_back(c: canvas.Canvas, x: float, y: float, card: TrackCard): label = f"{card.title} — {card.artists}" text_w = CARD_W - 2 * pad lines = wrap_text(label, text_w, "Helvetica", 8, c) - base_y = y + pad + (len(lines) - 1) * 3.8 + line_height = 9.5 + base_y = y + pad + (len(lines) - 1) * line_height for i, line in enumerate(lines[:3]): - c.drawCentredString(x + CARD_W / 2.0, base_y - i * 3.8, line) + c.drawCentredString(x + CARD_W / 2.0, base_y - i * line_height, line) def build_cards(tracks: List[dict], qr_size_mm: float) -> List[TrackCard]: cards: List[TrackCard] = []