From 7cdf72bfd4e5691596c881fcdde1fdbde5a725c4 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Tue, 29 Sep 2026 20:28:51 +0000 Subject: [PATCH] A card name that must break mid-word gets a hyphen hyphens:auto on the name, with the deck's naming the language, so a 16-letter name like Liechtensteiners that overflow-wrap has to split breaks with a hyphen rather than silently mid-word. --- library/packet/card-render.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/packet/card-render.js b/library/packet/card-render.js index 7b16377a2..0da23c2eb 100644 --- a/library/packet/card-render.js +++ b/library/packet/card-render.js @@ -143,10 +143,11 @@ export function createCardRenderer({ strings, lang = 'en', stock = 'poker', ? `left:10px;width:${COL - 20}px;top:${12 + PH + 6}px;bottom:10px;align-items:flex-start;justify-content:center;text-align:center;` : `left:${12 + PW + 10}px;right:8px;top:0;height:${BAND}px;`} font:700 ${SIDE ? 14 : 17}px Georgia,serif;color:#1b1a17;line-height:1.1;overflow:hidden; - overflow-wrap:anywhere} + overflow-wrap:anywhere;-webkit-hyphens:auto;hyphens:auto} /* Steps by the LONGEST WORD as well as the length: the name sits in a narrow box beside the photo, and one unbreakable word (the dataset has 16-letter ones, e.g. Pagativeshagallu) would overflow it - sideways. overflow-wrap:anywhere is the last resort, so a name is never cut off without a sign. */ + sideways. overflow-wrap:anywhere is the last resort, so a name is never cut off without a sign; + hyphens:auto (the deck's names the language) puts a hyphen where it does break. */ .nm.long{font-size:${SIDE ? 11.5 : 14}px} .nm.xlong{font-size:${SIDE ? 10.5 : 11}px}