From 0f4e0d17bdadbbfff6eb0f5117bb8d695a3843ee Mon Sep 17 00:00:00 2001 From: Juliet Date: Fri, 6 Mar 2026 12:00:19 +0100 Subject: [PATCH] reduce width of values in og card --- src/worker.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/worker.js b/src/worker.js index b08b5a4..52141df 100644 --- a/src/worker.js +++ b/src/worker.js @@ -208,8 +208,9 @@ function OgImage({ record }) { const guideMargin = Math.round((fontSize * 19) / 18); // Re-truncate string values if the larger font size means fewer chars fit. - // Available width: 1200 canvas - 100 padding - 80 logo area; Roboto Mono char ≈ 0.6× fontSize. - const maxStrWidth = Math.floor((1200 - 100 - 80) / (fontSize * 0.6)); + // Available width: 1200 canvas - 100 padding - 80 logo area - 200 for key/depth overhead; + // Roboto Mono char ≈ 0.6× fontSize. + const maxStrWidth = Math.floor((1200 - 100 - 80 - 200) / (fontSize * 0.6)); if (maxStrWidth < MAX_STRING_WIDTH) { for (const line of lines) { for (const seg of line.segments) { -- 2.51.2