5 ms·
> If you embed a font hosted somewhere else you expose some of your user data to them. Now with fonts there's a really simple solution: Just don't. As an added
by _fat_santa 4y ago
> If you embed a font hosted somewhere else you expose some of your user data to them. Now with fonts there's a really simple solution: Just don't. As an added bonus, hosting fonts on your own server is faster as it goes through the same HTTP connection.
I never quite understood the debate around fonts. You could use the CSS/Link import that Google provides, but that's never the optimal solution. Like you I always download the fonts and use them directly via @font-face.
The only advantage I see to using Google Fonts / some privacy respecting font service like this one, is when you are first prototyping an app and want to either test fonts, or want to move quickly and not worry about setting up fonts properly. We also used in a places like Storybook where having correctly set fonts is not as important.
But even if you did use it in prototyping, it's best practice to pull down those fonts and store them locally before going to production (at least in my mind).
Am I missing something?
- heretogetout 4y agoIf the font is already in your browser cache (which it might be if they're hosting it on a common CDN) web pages should load with the correct font right away instead of either loading blank areas or a default fallback font before switching to the correct font, causing jank. The best solution here is to use standard fonts that are available in all browsers, of course.
- modeless 4y agoSorry, not since cache partitioning. https://developer.chrome.com/blog/http-cache-partitioning/ https://developer.chrome.com/blog/http-cache-partitioning/ Privacy killed the shared cache.
- SquareWheel 4y agoAnd it's such a niche privacy issue too. I would gladly take a shared cache over cache isolation. Especially for something used on as many sites as Google Fonts is.
- mikeiz404 4y agoYou may be interested in the LocalCDN extension [1] which tries to solve the privacy vs speed issue for common resources by intercepting known remote resource requests and returning a local copy. 1: https://www.localcdn.org/ https://www.localcdn.org/
- SquareWheel 4y agoIt looks like it's only "officially" supported on Firefox, but I'll give it a try. Thanks.
- mritzmann 4y agoFor data protection reasons, this has not been the case for a long time. Both for Firefox and Chrome.
- ncmncm 4y agoOn Firefox desktop, I force literally all fonts -- serif, sans, what-have-you -- to Linux Libertine. Dingbats can look odd, but you get used to that. For reasons I am sure I will never fathom, browsers on mobile provide all the same settings options, and religiously ignore them.
- cmeacham98 4y agoI used to do this, but it broke a lot of websites, especially those that use custom fonts to display symbols. Nowadays, what I do (and recommend to others) is to set Firefox to never send a referer cross-origin, so google fonts and similar don't get to see what website I'm on. I've found that very few websites break with this.
- runarberg 4y agoFont icons is another one of these things that some web developers tend to do and should probably stop. SVG icons are superior in every way—at least all the ways I can think of.
- efreak 4y agoA growing number of websites support dark mode theming, but not all of them. When I open a page in reader mode and switch to dark theme, I don't expect logos in the text to fade into the background. Svg is also often much larger than a font file, especially one that's subset. While it's not svg or on the open web, I have a particular hate for sborn.jpeg in ebooks, as I read my ebooks in dark mode at night and having occasional section break symbols (ornaments) white on black is particularly irritating. Other unnecessary images often found in ebooks include bullets, chapter titles flourishes, letters with accents, and even the chapter title itself.
- account42 4y ago> I don't expect logos in the text to fade into the background. You can use @media (prefers-color-scheme: dark) { ... } in the style inside the .svg and browsers render it accordingly in dark/light mode. But yes, not being able to set the color from the page CSS is annoying.