frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Why can't I apply custom fonts to HN?

2•-__-•1h ago
I'm building a mobile browser (webkit base) with accessibility features, including an option to override page fonts with OpenDyslexic. I have tried every permutation of:

const style = document.createElement('style'); style.textContent = ` @font-face { font-family: 'OpenDyslexic'; src: url('data:font/opentype;base64,...') format('opentype'); } * { font-family: 'OpenDyslexic', sans-serif !important; } `; document.head.appendChild(style);

it works everywhere. every link I click from this page, every website from the 90s I can find. everywhere except here!

On HN, the font-family CSS applies (I can see it in the inspector, elements show font-family: OpenDyslexic !important), but the actual rendered font falls back to sans-serif. The @font-face is in the DOM. The base64 is valid, the code works on other sites.

Tried: blob URLs instead of data URLs, MutationObserver to reapply, targeting specific elements (font, td, table), setTimeout delays. so much more. Nothing works on HN specifically.

Is there something about HN's markup or headers that would cause @font-face to fail silently? Has anyone dealt with this issue or know why it could be happening? content security policy & cors don’t seem at fault bc the base64 is in the dom. What might I be missing?

Comments

efortis•1h ago
Since this works

  const style = document.createElement('style')
  style.textContent = `* { font-family: Arial }`
  document.head.appendChild(style)
I'd say the `data:` URL of the font is violating the Content-Security-Policy, which should show an error in the Console.

Their CSP has `default-src 'self'` and has no font-src, so font-src is 'self' too (it would need `data:` as well)

The Secretive VIP Programs That Keep Gamers Spending

https://www.nytimes.com/2026/01/20/arts/zynga-vip-video-games.html
2•bookofjoe•1m ago•1 comments

O Fortuna

https://robcruser.substack.com/p/o-fortuna
1•joebig•3m ago•0 comments

StoryGleam – Use Storybook with Gleam Projects

https://codeberg.org/theSuess/storygleam
1•TheWiggles•4m ago•1 comments

Tesla unsupervised Robotaxis are nowhere to be found

https://lightbrd.com/ZacksJerryRig/status/2015119993428705575#m
2•TheAlchemist•11m ago•0 comments

Show HN: Reel Rogue – A browser roguelike (idler) about manipulating the odds

https://www.alt-qq.com/
1•qq-niklas•12m ago•0 comments

Show HN: AI agent that searches the Cursor forum

https://cursor.trynia.ai/
2•jellyotsiro•12m ago•0 comments

Nvidia: Dynamic Memory Compression

https://developer.nvidia.com/blog/dynamic-memory-compression/
1•alecco•16m ago•0 comments

Show HN: Skget, another CLI to add skills to your coding agents

https://github.com/czheo/skget
1•czheo•17m ago•0 comments

Code as Content

https://www.contraption.co/code-as-content-and-digital-proprioception/
1•philip1209•17m ago•0 comments

CIO: Work-from-office mandate? Expect top talent turnover, culture rot

https://www.cio.com/article/4119562/work-from-office-mandate-expect-top-talent-turnover-culture-r...
4•dmitrygr•18m ago•0 comments

Failure to press button caused outage on train lines in Tokyo

https://www.asahi.com/ajw/articles/16307027
2•resonious•26m ago•0 comments

EU groupthink manifests itself as polite silence

https://www.ft.com/content/ecf765d1-6110-420d-abcf-9255ec015b19
1•hhs•27m ago•0 comments

Show HN: C From Scratch – Learn safety-critical C with prove-first methodology

https://github.com/SpeyTech/c-from-scratch
2•william1872•28m ago•0 comments

Hiltzik: Yes, California should tax billionaires' wealth. Here's why

https://www.latimes.com/business/story/2026-01-08/yes-california-should-tax-billionaires-wealth-h...
4•PaulHoule•29m ago•0 comments

Backseat Software

https://blog.mikeswanson.com/backseat-software/
1•ruuda•29m ago•0 comments

Adoption of EVs tied to real-world reductions in air pollution: study

https://keck.usc.edu/news/adoption-of-electric-vehicles-tied-to-real-world-reductions-in-air-poll...
2•hhs•30m ago•0 comments

We are building a new browser from scratch, backed by a non-profit

https://ladybird.org/
6•nailer•40m ago•1 comments

Coding assistants are slow. So we multitask

3•brunaxLorax•44m ago•2 comments

Unhappiness Is a Choice

https://andrewconner.com/the-option-method/
2•SouravInsights•44m ago•0 comments

Everybody wants to be Thomas Bernhard

https://www.househousemagazine.com/everybody-wants-to-be-thomas-bernhard
1•hhs•45m ago•0 comments

We X-Rayed a Suspicious FTDI USB Cable

https://eclypsium.com/blog/xray-counterfeit-usb-cable/
2•aa_is_op•50m ago•0 comments

AI and Abandonware

https://jonathannen.com/ai-npm-abandonware.html
1•jwilliams•52m ago•0 comments

Analysis of Alex Pretti Shooting in Minneapolis [video]

https://www.youtube.com/watch?v=LkFcFVZuBI0
15•doener•53m ago•3 comments

Specs.md – AI-native development framework

https://specs.md
2•onatm•55m ago•0 comments

Show HN: Ask CLI – A simple tool to get help with commands from the terminal

https://github.com/david-minaya/ask
3•david-minaya•57m ago•0 comments

Genomic evolution of pancreatic cancer at single-cell resolution

https://www.nature.com/articles/s41588-025-02468-9
1•bookofjoe•59m ago•0 comments

The truth about phones and mental health [video]

https://www.youtube.com/watch?v=2yVJffNplJc
1•heavyset_go•59m ago•0 comments

Show HN: I built a Mac OS App to upload your screenshots to S3

https://gofwd.to/screenfwd
2•RCM7•1h ago•0 comments

The DBLP computer science bibliography needs financial support

https://blog.dblp.org/2025/12/18/dblp-is-humbly-asking-you-for-your-kind-support/
1•leoc•1h ago•0 comments

Edward Tryon

https://en.wikipedia.org/wiki/Edward_Tryon
1•doener•1h ago•1 comments