fix(memo): RU Memo Back overflow — cyrillic font fallbacks + vertical grid auto-fit - #452
Merged
Merged
Conversation
… grid auto-fit QA 2026-06-10 verdict: Memo Back RU FAIL x3 (subtitle wrapped out of the banner, serif fallback on all display headings, families 6-7 cut off at the card bottom). FR/EN/PT unaffected (PASS). Template Cards/Memo/Argumentum_Memo_Back_fr.json: - extCSS: add Oswald (cyrillic condensed display) + PT Sans Narrow (cyrillic condensed body) to the Google Fonts request - fix 'sans-serit' typo on .header .subtitle (invalid token made the fallback resolve to the default serif) - cyrillic-capable fallbacks on the latin-only display stacks: .subtitle/.family/.subfamily 'Bebas Neue'->+Oswald, .subsubfamily 'Dosis'->+PT Sans Narrow - .subtitle: white-space:nowrap + max-width + overflow:hidden and .header > div max-width:100% so a too-long subtitle overflows horizontally (measurable) instead of wrapping out of the banner - per-glyph fallback: Latin renders are byte-identical (Bebas/Dosis still serve all Latin glyphs first) CardPen Generation/CardPen/js/frame.js: - autoFitCardTitles now also targets .subtitle (only Memo Back uses it) - new autoFitFamilyGrid(): binary-search the .familyContainer font-size when .cardContainer overflows vertically (grid is fully em-based so one knob rescales families/subfamilies/items uniformly); no-op when the card already fits; wired into generateImages() before capture Validated live (Playwright, local CardPen on the working tree): - RU: geometry 7 families x 3 subfamilies x 3 items, subtitle on one line inside the banner, no serif fallback, grid shrunk 5.93->5.43px, card fits (overflow 2px = tolerance) - FR: both auto-fits NO-OP (natural sizes kept), 7x3x3 intact -> no regression vs Golden Master Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexte
Verdict QA géométrique 2026-06-10 (recheck master
5ea58c8c, régén Release po-2023) : Mémo Back RU FAIL ×3 — sous-titre wrappé hors du bandeau rouge, polices display en fallback serif, familles 6–7 (Лукавство, Обструкция) coupées en bas de carte. FR/EN/PT = PASS (non touchés). Chemin critique release (fenêtre FABLE, relay 2026-06-10 22:29Z).Root causes
.header .subtitle { font-family:'Bebas Neue', sans-serit; }— token invalide → fallback navigateur serif pour les glyphes cyrilliques (Bebas Neue est Latin-only)..subfamily('Bebas Neue'seul),.subsubfamily('Dosis'seul) → serif + métriques plus hautes → débordement vertical.Fix (language-invariant, no-op quand ça tient)
Template
Argumentum_Memo_Back_fr.json(6 remplacements chirurgicaux, JSON revalidé) :sans-serit→sans-serif.subtitle/.family/.subfamily→'Bebas Neue','Oswald',sans-serif;.subsubfamily→'Dosis','PT Sans Narrow',sans-serif.subtitle:white-space:nowrap+max-width:100%+overflow:hidden+ contrainte.header > div→ un sous-titre trop long déborde horizontalement (mesurable) au lieu de wrapper hors bandeauCardPen
js/frame.js(même philosophie que #400/#190) :autoFitCardTitlescible désormais.title, .subtitle(seul Mémo Back a un.subtitle— rayon d'action nul ailleurs)autoFitFamilyGrid(): recherche dichotomique sur la font-size de.familyContainer(toute la grille est en em → un seul bouton rescale uniformément) quand.cardContainerdéborde verticalement ; no-op si la carte tient ; branché dansgenerateImages()avant captureValidation LIVE (Playwright, CardPen local sur l'arbre de travail, protocole géométrique)
Captures :
render_ru_fixed.png/render_fr_nonregression.png(validation locale, non commises).Handoff régén
⚠ Après merge : clobber les harvests Mémo (
Target/*/Harvest/*Memo*) avant régén Release, sinon le PNG montrera l'ancien render (leçon stale-harvest 2026-06-07).🤖 Generated with Claude Code