Roel Nieskens on Nostr: If a webfont doesn't support a character that's on the page, the browser will go down ...
If a webfont doesn't support a character that's on the page, the browser will go down its internal font stack until it finds a fallback font to render that character.
I thought this meant you could never see a webfont's .notdef "tofu" glyph.
But TIL that if you use a Private Use Area unicode value, the browser will try to render it in the first webfont on the stack, and if it can't, use *that webfont's* .notdef instead.
#typography #css
Published at
2024-09-18 07:53:53Event JSON
{
"id": "016f6e14cfa6c63ff42ffee1e23331567e844f7e418f16e6729dffbea68cdb80",
"pubkey": "fd5fc007b4b179a533ceff6c577892d7c82932701d5b3c855f3f826373824f54",
"created_at": 1726646033,
"kind": 1,
"tags": [
[
"t",
"typography"
],
[
"t",
"css"
],
[
"proxy",
"https://typo.social/users/pixelambacht/statuses/113157474441831316",
"activitypub"
]
],
"content": "If a webfont doesn't support a character that's on the page, the browser will go down its internal font stack until it finds a fallback font to render that character.\n\nI thought this meant you could never see a webfont's .notdef \"tofu\" glyph.\n\nBut TIL that if you use a Private Use Area unicode value, the browser will try to render it in the first webfont on the stack, and if it can't, use *that webfont's* .notdef instead.\n\n#typography #css",
"sig": "272749fbef352ab82c26cd9af16d1ae93f6732a675c921c6bc944eae9dd602f9a90a8681b43dd0f98a04b1e05d10360ab96f1804c0e665aeea34de921e9037f0"
}