From 9b8606535d08e4ed3c5117ed57c19aa3f28f2352 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 19 Mar 2025 21:46:25 -0700 Subject: [PATCH] style: Vertically center text 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 cee2a7f0e..c86614433 100755 --- a/scripts/logo_svg.py +++ b/scripts/logo_svg.py @@ -35,7 +35,7 @@ def generate_svg_with_embedded_font(font_path, text="aider", color="#14b014", ou width = len(text) * char_width + 40 # Add padding height = 100 text_x = width / 2 # Center point of the SVG width - text_y = 65 + text_y = height / 2 # Center point of the SVG height # Create the SVG with embedded font svg = f""" @@ -52,6 +52,7 @@ def generate_svg_with_embedded_font(font_path, text="aider", color="#14b014", ou font-size: 60px; fill: {color}; text-anchor: middle; /* Center the text horizontally */ + dominant-baseline: middle; /* Center the text vertically */ }} .background {{ fill: black;