From 879536986f99dd8a283aedd8a94a0523ad969bcc Mon Sep 17 00:00:00 2001 From: vl Date: Mon, 21 Sep 2026 23:35:38 +0200 Subject: [PATCH] revert: keep the wordmark's original letter-spacing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tightening the gaps bought letters a third taller at the same width, which helped the hairlines — but it changed the logotype's character, and the shop prefers the drawing as it was designed. The logo returns to 260x36 with its spacing intact. The threshold fix that made the A's diagonal survive stays: that was a separate problem and it is still solved. lib/brand/tighten.ts and `npm run brand:variants` are kept rather than deleted. Both are tested, the variants script is also how the threshold itself was chosen, and a spacing decision is one to revisit by looking at renders rather than by imagining them. The logo's rendered size is still read from the PNG header rather than copied into the renderer, which is what made this reversal a one-line change with nothing to keep in sync. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_012cSY9pVhZmJUKNN7wf1Myd --- public/brand/logo-eink.png | Bin 505 -> 393 bytes scripts/brand.ts | 34 +++++++++------------------------- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/public/brand/logo-eink.png b/public/brand/logo-eink.png index 331ca16a429e1a6b6cee63043326d770d713849e..a1294796823dca88a4b94e0e144e408daaad9109 100644 GIT binary patch delta 379 zcmV->0fhef1BnBW7k?xH00000N2qxv0003{NklKM<7fc8;Jp;kNG$@9tktg=XlMa?NaAH&*;xcq1O)RXLIcV@ihpQE;Vie3#5pS1*v#KRnmao?i?lHj>ZS+{uoV54`034B&_WDb;*?(h zDZB<;dqW(2yL1+dy*SzupHjINt25olW_{|-Qm9I(O4wSU7Sb_GQF<)b7*vVUr<3R^ zQF>i61nF&FijtQkyq$#|Mb2C=haj=-H7K``i~{kLTbG2+!sP60z>CP)zj*!t!triZPifjM?002ovPDHLkV1oBgsCWPX delta 492 zcmV90eop(Hivt^@v3?!uY{wH~*M+QbeREiTxXolYD*wH@1X#iNmJY zA9a7SOaS@_K$DEMwE#8%=*Z+W6CxM*$Dw%+tL_yKa9S73{VRtgdBz6Vz7lyg3;*PL)D{=WM zE*TB8uHv4s4a0PrWBK+r3kbH`I6fBVat$0jZ;&)Oj zk*mN`3?CQ225gDEC4S^qWG6(~5;r0|PKaAMd{D^pI~L2Q?&w$I=)Dw2Z%zxcmElUv z74#ResKR!hTi?6HTNp8Ceh09pJKlhwGifY+hwvvgj$V}rnTR)<$)a3YK&pZ zk0t`y%CHH?DTBs*@}mf&_>*)I(qpPhwcRU8V#$&nqpOL_0L6lyu|9p&QmYZ{b{ol` i&&<}h;roAmJzfABo|>)<)EwIY0000 { await writeFile(path.join(directory, 'logo.png'), original); const band = await findWordmarkBand(original); - - // Tighten at full resolution, before any downscale: compressing columns that - // are already an average of ink and paper would smear the hairlines. - const full = await sharp(original) + const cropped = await sharp(original) .extract({ left: 0, top: band.top, width: band.width, height: band.height }) - .flatten({ background: '#ffffff' }) - .greyscale() - .raw() - .toBuffer({ resolveWithObject: true }); - - const tightened = tighten( - { data: full.data, width: full.info.width, height: full.info.height }, - EINK_LETTER_GAP, - ); - - const cropped = await sharp(tightened.data, { - raw: { width: tightened.width, height: tightened.height, channels: 1 }, - }) .resize({ width: EINK_WIDTH }) + .flatten({ background: '#ffffff' }) .ensureAlpha() .raw() .toBuffer({ resolveWithObject: true });