[object Object]

← back to CelebritySignatures

wear: accent-fold worn-shot slug candidates (Velázquez→velazquez, Molière→moliere)

22b0ebaeb1f4c1eb82cc10d8d6771ad75eee9658 · 2026-09-09 17:00:03 -0700 · Steve

The auto-detect stripped accents to nothing (velázquez→velzquez), so accented-name
shots would never surface. Normalize NFD + strip diacritics first, matching the
pipeline's transliterated campaign-<slug>.jpg filenames. Verified across the
accented top-50 names. Display-only, reversible.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 22b0ebaeb1f4c1eb82cc10d8d6771ad75eee9658
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed Sep 9 17:00:03 2026 -0700

    wear: accent-fold worn-shot slug candidates (Velázquez→velazquez, Molière→moliere)
    
    The auto-detect stripped accents to nothing (velázquez→velzquez), so accented-name
    shots would never surface. Normalize NFD + strip diacritics first, matching the
    pipeline's transliterated campaign-<slug>.jpg filenames. Verified across the
    accented top-50 names. Display-only, reversible.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 public/wear.html | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/public/wear.html b/public/wear.html
index 848d8b2..29e86e9 100644
--- a/public/wear.html
+++ b/public/wear.html
@@ -232,7 +232,10 @@ const INK_PRESETS = [
 // pin the non-obvious existing files.
 const LIFESTYLE_OVERRIDE = { 'vincent van gogh':'vangogh', 'frida kahlo':'frida' };
 function lifestyleCandidates(name){
-  const n = (name || '').toLowerCase().replace(/[^a-z ]/g,'').trim();
+  // Fold accents first (Velázquez→velazquez, Molière→moliere, Dürer→durer) so
+  // the slug matches the pipeline's transliterated campaign-<slug>.jpg filenames,
+  // THEN drop anything non-alphabetic.
+  const n = (name || '').toLowerCase().normalize('NFD').replace(/[̀-ͯ]/g,'').replace(/[^a-z ]/g,'').trim();
   if (!n) return [];
   const cands = [];
   if (LIFESTYLE_OVERRIDE[n]) cands.push(LIFESTYLE_OVERRIDE[n]);

← d8381ce wear: auto-detect campaign-<slug>.jpg for the 'worn' shot in  ·  back to CelebritySignatures  ·  wear: 43 worn editorial campaign shots for top-signer roster a0253a8 →