Cards say one thing: trimmed copy, and a title that fits the band

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
wuwiandClaude Fable 5 committed 2026-08-10 22:14:32 +02:00
1 parent 9fab26eec9
commit 4e80bd8cb2
4 files changed
+13 -15

No files matched your search

+7 -1
View File
@@ -1348,7 +1348,13 @@ function cardBody(c, dx) {
// scoreboard and the ads, and 30 read as oversized the moment it left centre court. The stack
// keeps its own line rhythm (0/30/44) and is centred as ONE block, so a one-line card and a
// three-line card sit on the same axis instead of both hanging off the band's top edge.
const lines = [[title, B(22), 0, color]];
// ...and the title FITS. Cards carry whole sentences now ("SWING TO RETURN — OR SWISH IT AWAY")
// and boss names of any length, and Bangers 22 ran a long one off both edges of a phone. Measure
// once and shrink to the band; 22 stays 22 for everything that already fit.
ctx.font = B(22);
const tw = ctx.measureText(title).width;
const tSize = tw > W - 24 ? Math.max(13, Math.floor(22 * (W - 24) / tw)) : 22;
const lines = [[title, B(tSize), 0, color]];
if (sub1) lines.push([sub1, F(8), 30, UI.cream]);
if (sub2) lines.push([sub2, F(8), 44, UI.cream]);
const s = inkSpan(lines);