News for hackers. Stuff that matters.
Re:Self-host your fonts for better performance by sergeykish on Friday December 04, 2020 @01:11PM (#25305680)
There are so many solutions!

* In uBlock Origin (which is a must have on bad internet): Settings > Block remote fonts

* In browser, Firefox about:config, gfx.downloadable_fonts.enabled, Chrome run with --disable-remote-fonts

* Download fonts when on good connection

> You can download all Google Fonts in a simple ZIP snapshot (over 300MB)

> https://github.com/google/fonts

installation depends on OS, on Arch Linux it would be

    $ yay -S ttf-google-fonts-git
basically it puts font file under /usr/share/fonts/

Google recommends

> using a fonts manager (such as SkyFonts) that automatically syncs the latest versions of fonts from the Google Fonts API to your computer.

https://developers.google.com/fonts/faq

------

I browse with JS disabled by default in uMatrix, turn it off on problematic websites (maybe ten times a day). It would revert back to disabled on next browser reload. And I have maybe 20 hosts enabled by default which I use often enough.

Re:Self-host your fonts for better performance by sergeykish on Saturday December 05, 2020 @09:02AM (#25314609)
Unfortunately

> If the local() function is provided, specifying a font name to look for on the user's computer, and the user agent finds a match, that local font is used. Otherwise, the font resource specified using the url() function is downloaded and used.

https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face

And this is not the case for Google Fonts anymore, for example

https://fonts.googleapis.com/css2?family=Noto%20Sans

I've created issue

https://github.com/google/fonts/issues/2855

----

>> Any correctly-coded website will try a local source first, which should help a lot for poor connections.

> Then Google Fonts is not correctly coded, as it'll use remote font only. And myriads of websites reusing Google Fonts snippets. To try local source first, you have to explicitly ask for it in @font-face/src which Google Fonts does not do.

> So installing font into your OS won't help you with any website using Google Fonts service.

https://news.ycombinator.com/item?id=25301830

Re:Self-host your fonts for better performance by Tanath on Friday December 04, 2020 @03:44PM (#25307659)
Are you just clinging to the last dev version of uMatrix, or did you find an active fork or something?
Re:Self-host your fonts for better performance by sergeykish on Friday December 04, 2020 @04:49PM (#25308575)
I use last one, it works and I've implemented shortcut to relax restrictions

https://github.com/sergeykish/uMatrix/commit/929a25e39fc1d38...

Re:Self-host your fonts for better performance by hda2 on Friday December 04, 2020 @10:14PM (#25311363)
Many of us still us just use the latest version of uMatrix on addons.firefox.com. Nothing else comes close to giving you the same kind of control.