website: the share card's wordmark is the brand's own, with the blue .eu
gates / gates (push) Successful in 6m15s

The old card's lettering was plain white and in some other face. The card now
takes assets/logo-wordmark.png - the same file the sidebar shows - scaled to the
old lettering's ink height and alpha-composited in its place, so felhom is white,
.eu is blue, and the drawn outline is there. The cloud mark beside it is still
the old card's pixels, which were always right. og:image ?v=3.
This commit is contained in:
2026-10-12 15:34:54 +02:00
parent 0fbba61030
commit c0a2953bea
24 changed files with 57 additions and 39 deletions
+13 -1
View File
@@ -55,6 +55,12 @@ CARDS = {
"en": ("og-image-en.png", (208, 382), (510, 572)),
}
LOGO_BAND = (76, 132)
# The old card's wordmark was plain white; the brand's is "felhom" white and ".eu" blue (operator,
# 2026-10-12). It is not a font we can set - it is drawn lettering with an outline - so the card
# takes assets/logo-wordmark.png, the same file the sidebar shows, instead of the old card's pixels.
MARK_X = (73, 153) # the cloud mark on the old card, which is unchanged
WORD_AT = (176, 89) # where the old card's lettering began, and where the real one goes
WORD_INK_H = 34 # its ink height there
def ink_bbox(im, y0, y1, thresh=300):
@@ -116,7 +122,13 @@ def build(lang, check):
region = card.crop((at[0], at[1], at[0] + part.size[0], at[1] + part.size[1]))
card.paste(ImageChops.lighter(region, part), at)
lay(logo, (LEFT, logo[1]))
lay((MARK_X[0], LOGO_BAND[0], MARK_X[1], LOGO_BAND[1]), (MARK_X[0], LOGO_BAND[0]))
word = Image.open(os.path.join(A, "logo-wordmark.png")).convert("RGBA")
wb = word.getbbox() # the lettering's own edges inside its canvas
word = word.crop(wb)
ws = WORD_INK_H / float(word.size[1])
word = word.resize((int(round(word.size[0] * ws)), WORD_INK_H), Image.LANCZOS)
card.paste(word, WORD_AT, word)
scale = HEAD_WIDTH / float(head[2] - head[0])
lay(head, (LEFT, HEAD_TOP), scale)
lay(pill, (LEFT - 1, pill[1]))