mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
style: Vertically center text in SVG logo
This commit is contained in:
parent
0b79fd0a8e
commit
9b8606535d
1 changed files with 2 additions and 1 deletions
|
@ -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
|
width = len(text) * char_width + 40 # Add padding
|
||||||
height = 100
|
height = 100
|
||||||
text_x = width / 2 # Center point of the SVG width
|
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
|
# Create the SVG with embedded font
|
||||||
svg = f"""<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
svg = f"""<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
@ -52,6 +52,7 @@ def generate_svg_with_embedded_font(font_path, text="aider", color="#14b014", ou
|
||||||
font-size: 60px;
|
font-size: 60px;
|
||||||
fill: {color};
|
fill: {color};
|
||||||
text-anchor: middle; /* Center the text horizontally */
|
text-anchor: middle; /* Center the text horizontally */
|
||||||
|
dominant-baseline: middle; /* Center the text vertically */
|
||||||
}}
|
}}
|
||||||
.background {{
|
.background {{
|
||||||
fill: black;
|
fill: black;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue