Cannot render glyphs in open graph images

Sites that do not use Latin letters (chinese, korean, japanese...) do not render text properly in the open graph image:

image

Can you check what we need to render those glyphs correctly?

current site with the issue: @Untitled Contact

Solution

PR #1435 adds fallback Noto Sans fonts from Google Fonts for missing non-Latin glyphs and now renders emoji using pinned Twemoji 15.1.0 SVGs from jsDelivr, returned as data URIs by the asset loader. Fetches use a bounded cache and five-second timeout; failures retain the box fallback without throwing. The avatar initial uses Array.from(name)[0] instead of slice(0, 1) to avoid splitting a surrogate pair. Twemoji (CC-BY 4.0) and Noto Sans attribution is included in THIRDPARTYNOTICES. The earlier layout=3 cache-key change remains, regenerating cached broken previews. Pushed, not merged.

Root cause: the image route supplied satori only Inter fonts without a fallback for missing non-Latin glyphs. For emoji, satori cannot draw color emoji fonts and requests an image through loadAdditionalAsset('emoji', segment); the loader returned nothing, producing NO GLYPH boxes. Separately, name.slice(0, 1) cut emoji surrogate pairs in half in avatar initials.

Review decision โ€” privacy and availability: Google Fonts receives non-Latin title characters, including for private documents. Emoji rendering now also depends on jsDelivr at render time. Review these external-service dependencies before merging; bundling assets is an alternative.

Verification reported by T3: reproduced emoji boxes on previous head b7348148b using the issue document's title. Four new emoji tests failed before and pass after the fix: three emoji filename conversions and a render test checking pixels from a stubbed image. Web tests: 86 files, 814 passed, 1 pre-existing skip. Web typecheck: clean. Prettier: no changes. After images used real jsDelivr and Google Fonts network fetches; Korean and Latin titles still render correctly. Screenshots are server-rendered PNGs from the image route, not browser interaction tests. Local CI (agent-ci) was not run because Docker is unavailable; GitHub CI remains a review gate.

PR screenshots follow-up (reported by T3): added all five evidence images to the existing PR #1435 description in a Screenshots section before the footer, preserving the rest of the description. T3 verified that each hyper.media gateway link returned a 1200ร—630 PNG matching the local evidence SHA-256 hash, then confirmed the image links in the PR body. The PR remains open and unmerged at head 624342284; this follow-up made no code changes.

Before / After

Before: the ๐Ÿ’ฅ emoji renders as a NO GLYPH box in the title, author name and avatar

Before โ€” previous PR head: the ๐Ÿ’ฅ emoji renders as a NO GLYPH box in the title, author name and avatar.

After: the ๐Ÿ’ฅ Twemoji renders in the title, author name and avatar

After โ€” with the fix: the ๐Ÿ’ฅ Twemoji renders in the title, author name and avatar.

Before: the Korean title renders as NO GLYPH boxes on unmodified code

Before: the Korean title renders as NO GLYPH boxes on unmodified code.

After: the Korean title still renders correctly

After: the Korean title still renders correctly in the final code.

After: a Latin title still renders as before

Additional regression evidence: a Latin title still renders as before.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Connections0
Cannot render glyphs in open graph imagesCannot render glyphs in oโ€ฆ
Citations 0Children & links 0

Loading child documentsโ€ฆ

Connections show where other documents or comments link to this document.

Related documents

Loading connectionsโ€ฆ