fix(docs-og-image): match reference cover template typography exactly… · simstudioai/sim@def2d52 · GitHub
Skip to content

Commit def2d52

Browse files
authored
fix(docs-og-image): match reference cover template typography exactly (#5598)
* fix(docs-og-image): match reference cover template typography exactly - swap Season Sans for Söhne Kräftig (500) — the reference cover's actual brand font, confirmed by letterform comparison; recovered from git history since it was removed as an unused static asset - fix ink/background colors to exact reference hex values - square caps + miter join on the corner arrow to match the reference's sharp corners instead of rounded ones - recalibrate title font size, line height, and wrap width for the new font's metrics * fix(docs-og-image): estimate CJK glyph width separately to avoid under-wrap wrapTitleLines budgeted a flat 0.42em/char, tuned for Latin text. Docs ships ja/zh locales — CJK glyphs render near-square (~1em), so a CJK title could overflow the fixed-width title box uncaught. Sum per-char em-width with a CJK-range check instead of counting characters. * fix(docs-og-image): fall back to character-level wrap for oversized CJK words wrapTitleLines only splits at spaces, so a space-free CJK run (common for Chinese titles) still arrived as a single word wider than the title box and rendered as one overflowing line. Falls back to character-level chunking for any word that alone exceeds maxWidthEm.
1 parent 591516a commit def2d52

3 files changed

Lines changed: 78 additions & 32 deletions

File tree

‎apps/docs/app/api/og/route.tsx‎

Lines changed: 78 additions & 32 deletions
-155 KB
Binary file not shown.
94.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)