From 0b79fd0a8e767f868e7b453304b3818cb3aa2833 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 19 Mar 2025 21:45:58 -0700 Subject: [PATCH] style: Center text horizontally in SVG logo --- scripts/logo_svg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/logo_svg.py b/scripts/logo_svg.py index c026ce4af..cee2a7f0e 100755 --- a/scripts/logo_svg.py +++ b/scripts/logo_svg.py @@ -34,7 +34,7 @@ def generate_svg_with_embedded_font(font_path, text="aider", color="#14b014", ou char_width = 40 width = len(text) * char_width + 40 # Add padding height = 100 - text_x = 20 + text_x = width / 2 # Center point of the SVG width text_y = 65 # Create the SVG with embedded font @@ -51,6 +51,7 @@ def generate_svg_with_embedded_font(font_path, text="aider", color="#14b014", ou font-family: 'GlassTTYVT220', monospace; font-size: 60px; fill: {color}; + text-anchor: middle; /* Center the text horizontally */ }} .background {{ fill: black;