this post was submitted on 08 May 2026
739 points (96.7% liked)

Privacy

48499 readers
755 users here now

A place to discuss privacy and freedom in the digital world.

Privacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy.

In this community everyone is welcome to post links and discuss topics related to privacy.

Some Rules

Related communities

much thanks to @gary_host_laptop for the logo design :)

founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Programman4233@lemmy.dbzer0.com 4 points 4 days ago (2 children)

I don't anything about web development, so I assumed websites told browsers: 'Hey type this text in X font.' If the machine didn't have that font the browser would fall back to another font.

[–] yogthos@lemmy.ml 2 points 3 days ago

that would be a sensible way to do it, but turns out the browser leaks a lot of this information to the site because reasons

[–] TherapyGary@lemmy.dbzer0.com 1 points 3 days ago

That is how it works, but that fall back tells the website what is and isn't available. Websites don't get a list provided by your browser- this website tests a big list of them:

/* Fonts — measured via width comparison; the device names what it carries */ const testFonts = ['Helvetica Neue','Georgia','Courier New','Comic Sans MS','Impact','Trebuchet MS','Palatino','Garamond','Futura','Gill Sans','Verdana','Tahoma','Lucida Console','Cambria','Consolas','Menlo','Monaco']; const installed = []; const probe = document.createElement('span'); probe.style.cssText = 'position:absolute;left:-9999px;font-size:72px;visibility:hidden'; probe.textContent = 'mmmmmmmmlli'; document.body.appendChild(probe); probe.style.fontFamily = 'monospace'; const baseW = probe.offsetWidth; testFonts.forEach(f => { probe.style.fontFamily = '"' + f + '",monospace'; if (probe.offsetWidth !== baseW) installed.push(f); }); document.body.removeChild(probe);

I use a custom font on one of my websites with the font files hosted on my server, which it offers to the browser, but it can be overridden by user accessibility settings