5 ms·
Or better yet, include the ttf/woff/woff2 files inside your project as an npm package using Fontsource[0]. [0]: https://github.com/fontsource/fontsource https:
by mimsee 4y ago
Or better yet, include the ttf/woff/woff2 files inside your project as an npm package using Fontsource[0].
[0]: https://github.com/fontsource/fontsource https://github.com/fontsource/fontsource
- usrn 4y agoOr even better just don't use custom fonts because they break a lot of things anyway.
- vehemenz 4y agoCan you give some examples? Custom web fonts have been well supported since the late aughts.
- usrn 4y agoThey're a big reason pages load slowly and cause text to jump around when they do. Custom web fonts are awful.
- deleted 4y ago[deleted]
- vehemenz 4y agoWeb fonts are pretty small and only load if used, and loaded only if they're not cached. It's definitely added requests, but those can be deferred intelligently. Reflowing is preventable using modern techniques, but honestly it doesn't seem like that big of a deal. The tradeoff is you get access to lots of different type options. More type options means more you can convey with type, which is a good thing for people who need to communicate on the web. It's more than just marketing sometimes.
- jhanschoo 4y agoFont variety help legibility through creating distinctions in context and hierarchy, though.
- xigoi 4y agoI wish there was a way to use KaTeX/MathJax without custom fonts.
- aldebran 4y agoWon’t that cause the fonts to download again if they were loaded by Google fonts? I thought the reason to use something like Google fonts was to have the fonts download only once.
- eurasiantiger 4y agoThat hasn’t worked for a while. Browsers will NOT use cached resources loaded for foo.com when loading bar.com, even if they are the same resource from the same CDN.
- chiefalchemist 4y agoCan you provide a link to support / verify this?
- steve_taylor 4y agohttps://google.com https://google.com
- kenniskrag 4y agohttps://developer.chrome.com/blog/http-cache-partitioning/ https://developer.chrome.com/blog/http-cache-partitioning/