fix: correct text alignment and title formatting in SVG

Adjusted text alignment and positioning in the cover template SVG for better rendering. Modified issue title format in the issue image creation script to uppercase for consistency.
This commit is contained in:
Kumi 2024-08-07 08:46:30 +02:00
parent d7570c1d0c
commit d3fa303364
Signed by: kumi
GPG key ID: ECBCC9082395383F
2 changed files with 6 additions and 6 deletions

View file

@ -7,7 +7,7 @@
width="2560"
height="1280"
viewBox="0 0 2560 1280"
sodipodi:docname="8fcxhv.svg"
sodipodi:docname="cover-template.svg"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
@ -4447,15 +4447,15 @@
<text
id="text619"
xml:space="preserve"
transform="translate(0,781.6484)"
style="letter-spacing:15px"
x="50%"
text-anchor="middle"><tspan
x="1280"
text-anchor="middle"
y="725.64838"><tspan
style="font-variant:normal;font-weight:100;font-stretch:normal;font-size:250px;font-family:'DM Sans';letter-spacing:15px;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
sodipodi:role="line"
id="tspan619"
x="1287.5"
y="0">__TITLE__</tspan></text>
y="725.64838">__TITLE__</tspan></text>
<text
id="text620"
xml:space="preserve"

Before

Width:  |  Height:  |  Size: 376 KiB

After

Width:  |  Height:  |  Size: 376 KiB

View file

@ -107,7 +107,7 @@ def create_issue_image(
period_string = get_period_string(period_start, period_end)
cover_template = cover_template.replace("__SITE__", site_title)
cover_template = cover_template.replace("__TITLE__", f"Issue {issue_number}")
cover_template = cover_template.replace("__TITLE__", f"ISSUE {issue_number}")
cover_template = cover_template.replace("__DATE__", period_string)
with tempfile.TemporaryDirectory() as tempdir: