From 8b5656ef260791696bba0a4e9d9e2c31ddf49012 Mon Sep 17 00:00:00 2001 From: rob thijssen Date: Mon, 11 May 2026 15:56:24 +0300 Subject: [PATCH] fix: specify sans-serif font in OG image SVG text elements The SVG text elements had no font-family, causing usvg to default to Times New Roman which isn't installed on the server. Specifying sans-serif uses the system default and silences the warnings. Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/moments-api/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/moments-api/src/main.rs b/crates/moments-api/src/main.rs index 143d6b0..612dbbe 100644 --- a/crates/moments-api/src/main.rs +++ b/crates/moments-api/src/main.rs @@ -309,14 +309,14 @@ fn render_contributions_png( String::new() }; svg.push_str(&format!( - r##"{total} contributions since {from}{repo_text}"##, + r##"{total} contributions since {from}{repo_text}"##, x = year_label_w, )); for (row_idx, row) in rows.iter().enumerate() { let y_base = title_h + (row_idx as f64) * step; svg.push_str(&format!( - r##"{yr}"##, + r##"{yr}"##, x = year_label_w - 4.0, y = y_base + radius, yr = row.year,