What are Web Fonts? (Best Practices for 2021)

Ғылым және технология

Typography accounts for 95% of web design. Your font choice can be critical for branding, readability, and performance. Recommendations for using web fonts have changed as browsers adopted new standards. Now in 2021, this video shares the best practices for using web fonts for high-performance sites.
0:00 - Introduction
0:19 - Web Safe Fonts
1:08 - System Font Stack
1:42 - Why Web Fonts?
2:08 - Self-Hosting
3:17 - Caching
3:39 - Font Display
4:24 - Flash of Unstyled Text (FOUT)
4:37 - Flash of Invisible Text (FOUT)
5:13 - Pre-loading
7:01 - Variable Fonts & Subsetting
8:28 - Conclusion
Links
-----
1: ia.net/topics/the-web-is-all-...
2: thehistoryoftheweb.com/web-fo...
3: developer.mozilla.org/en-US/d...
4: systemfontstack.com/
5: almanac.httparchive.org/en/20...
6: developers.google.com/web/upd...
7: developers.google.com/web/upd...
8: csswizardry.com/2020/05/the-f...
9: web.dev/preload-critical-assets/
10: web.dev/variable-fonts/
11: github.com/leerob/leerob.io
12: • Beyond fast with new p...
-----
Blog: leerob.io/
Twitter: / leeerob
GitHub: github.com/leerob
Course: react2025.com/

Пікірлер: 55

  • @leerob
    @leerob3 жыл бұрын

    Google Fonts is still a great resource for discovering fonts. For example, this link filters fonts to subset by latin languages and only show variable fonts. You can download fonts from here to self-host! fonts.google.com/?subset=latin&vfonly=true

  • @abhikb
    @abhikb3 жыл бұрын

    Please keep on making videos of these in-depth , Your explanation is crystal clear to me, Thanks a lot

  • @JackSparrah
    @JackSparrah3 жыл бұрын

    This is wild, I was just reading up on variable fonts last night - what great timing!

  • @SamFromaway
    @SamFromaway3 жыл бұрын

    Finally, someone who explains that in-depth. Thanks man.

  • @lancen6805
    @lancen68053 жыл бұрын

    I was just checking out your site, specifically the web fonts 2021 page. I figured I go onto youtube to further advice and boom here you are :) thanks for this video! Very helpful

  • @DarinDoria
    @DarinDoria3 жыл бұрын

    Definitely using these tips on the current site I'm building. Thanks for sharing!

  • @apayrus
    @apayrus3 жыл бұрын

    Last night I was working on fonts in my react native app, and now KZread recommends your video :-) thank you for info. 👍

  • @bessimboujebli1076
    @bessimboujebli10763 жыл бұрын

    Great content as always

  • @prakharmathur619
    @prakharmathur6193 жыл бұрын

    Thanks for this video and yes we do need more videos like this and yes we do need a video for improving performance and google rank in depth!!! Keep creating...

  • @k2p11
    @k2p113 жыл бұрын

    I use Comic Sans. Glad I watched this video!

  • @saurishs

    @saurishs

    3 жыл бұрын

    pls no comic sans

  • @armandsalle8447
    @armandsalle84473 жыл бұрын

    Nice video 👍 really clear and simple to understand

  • @alaji7
    @alaji73 жыл бұрын

    such good content, thanks!

  • @henriquematias1986
    @henriquematias19863 жыл бұрын

    very good material, thank you

  • @ApoorvMote
    @ApoorvMote3 жыл бұрын

    Avoid display swap at any cost explained with example. Mind blown!!. I always swapped fonts.

  • @sornt
    @sornt3 жыл бұрын

    Great !!! I love this. :-)

  • @TeoAlmonte
    @TeoAlmonte3 жыл бұрын

    Great video! i've been using subsetting for a while now and it's a must when using custom fonts imo. Have you tried using base64 fonts before? I usually base64 my fonts and then inline them in the head; It usually has the best performance. Would be curious to know if you've tried using base64 fonts and your thoughts.

  • @AdrianGonzalezBlogs
    @AdrianGonzalezBlogs3 жыл бұрын

    I love all your new content! Btw, how did you cache your fonts while using next js, did you set up a custom server?

  • @AKMagicianUnleashed

    @AKMagicianUnleashed

    3 жыл бұрын

    Adrian Gonzalez I’m curious about this as well

  • @leerob

    @leerob

    3 жыл бұрын

    You can see an example here: github.com/leerob/leerob.io/blob/master/vercel.json#L4-L14 You can also use `headers` in your `next.config.js`!

  • @AKMagicianUnleashed

    @AKMagicianUnleashed

    3 жыл бұрын

    @@leerob Good to know, thank you!

  • @eltonjothi
    @eltonjothi3 жыл бұрын

    Great content.! How would I subset my fonts from the google font, is there any tool?

  • @eddyhernandez2475
    @eddyhernandez24753 жыл бұрын

    He should have so much more subscribers

  • @David.P.
    @David.P.3 жыл бұрын

    Great video, really thorough material. The additional question would be how do you subset a font file to keep a certain type of characters.

  • @leerob

    @leerob

    3 жыл бұрын

    Here's one CLI tool. I believe there's also some online tools for this. www.afasterweb.com/2018/03/09/subsetting-fonts-with-glyphhanger/

  • @djangolean
    @djangolean3 жыл бұрын

    thanks sir.

  • @god-zd8wu
    @god-zd8wu3 жыл бұрын

    Nice!

  • @namakudamono
    @namakudamono3 жыл бұрын

    Great video! May I ask if there is any benefit to using the webfont.js library in 2021?

  • @minaroupolisvlogs6378
    @minaroupolisvlogs63783 жыл бұрын

    Great videos , I've watched a bunch in the past few days, I was wandering what theme are you using on vscode , I really like it !

  • @leerob

    @leerob

    3 жыл бұрын

    Sorcerer! leerob.io/uses

  • @K6TJO
    @K6TJO2 жыл бұрын

    Very helpful video but the part where the downloaded google fonts get converted to woff2 is missing? Is there a follow-up video on doing that?

  • @pranavpatil5849
    @pranavpatil58493 жыл бұрын

    Need a video on preload n prefetch in depth ..

  • @AwesomeLegend99
    @AwesomeLegend993 жыл бұрын

    Great video! Would you mind going into depth about how these tips could be used with NextJS? E.g. how the process of self-hosting fonts on Vercel works, how to fetch those fonts, etc.? Thanks!

  • @leerob

    @leerob

    3 жыл бұрын

    My blog uses this exact setup with Next.js and Vercel. You should be able to copy it from here! github.com/leerob/leerob.io

  • @AwesomeLegend99

    @AwesomeLegend99

    3 жыл бұрын

    @@leerob Thanks, much appreciated!

  • @da1kir
    @da1kir3 жыл бұрын

    How can I do the step in 7:01​ - Variable Fonts & Subsetting

  • @benw9949
    @benw9949 Жыл бұрын

    How can I get web fonts from sites like FontSquirrel, which often now says web fonts are allowed, but then does not include them for download? Various other free / libra / open-source font sites have this issue. Am I supposed to run them through a generator? Unclear. They used to host web fonts for download, but stopped. I'm now unclear on what I'm allowed to do, even though these are supposed to be legit for public, commercial-free use.

  • @KiliGraphics
    @KiliGraphics Жыл бұрын

    Cool

  • @OviDB
    @OviDB3 жыл бұрын

    If you self-host doesn't that mean that you are eating into your bandwidth allowance? Or is that not a thing with vercel?

  • @georgekrax
    @georgekrax3 жыл бұрын

    What extension do you use to grey out your import statements?

  • @leerob

    @leerob

    3 жыл бұрын

    Sorcerer is my theme! leerob.io/uses

  • @devi_buns
    @devi_buns3 жыл бұрын

    How do I do self-hosting if I'm not using nextjs

  • @leerob

    @leerob

    3 жыл бұрын

    Depends on what your tech stack is. You basically put your font files on your CDN and then reference them from your app!

  • @georgekrax
    @georgekrax3 жыл бұрын

    So if I use system fonts, I will not have to preload or do anything myself either. Is this true?

  • @leerob

    @leerob

    3 жыл бұрын

    Correct! However, you'd need to be okay with your site looking different cross-platform. For example, if you use the Apple system font, you'll need a different fallback for Windows users.

  • @cleo0318
    @cleo03183 жыл бұрын

    Anyone know how to integrate google fonts with Tailwindcss? I've tried EVERYTHING, cant seem to get it to work

  • @leerob

    @leerob

    3 жыл бұрын

    Hey! Are you using React or Vue or something else with Tailwind? In general, you'll want to override the tailwind config to add the custom font family, and then ensure you're loading the web font somewhere (e.g. CSS file or link tag).

  • @cleo0318

    @cleo0318

    3 жыл бұрын

    @@leerob Thanks for responding so promptly! I'm actually using Next.js with Tailwindcss. I'm using _document.js and between adding the google font . then in tailwind.config.js theme: { extend: { fontfamily: { sans: ['Manrope', ...defaultTheme.fontFamily.sans], } ..... Default font keeps loading! dont know why :( I have also tried using @import in /styles/global.css I can provide github link if thats okay :)

  • @leerob

    @leerob

    3 жыл бұрын

    @@cleo0318 Huh strange, that's exactly what I do on my site (using Tailwind / Next): github.com/leerob/leerob.io Feel free to share your link!

  • @cleo0318

    @cleo0318

    3 жыл бұрын

    @@leerob Issue is resolved! tailwind.config.js had such a minor typo i didnt notice. I used theme: { extend: { fontfamily: { fontfamily should be fontFamily! 😅😅😅 Good to know at least my approach was correct. Thanks for your response!

  • @sinashohrat2353
    @sinashohrat23533 жыл бұрын

    how can we subset fonts?

  • @jacquestertulien

    @jacquestertulien

    3 жыл бұрын

    Graphhanger and fonttool

  • @jacquestertulien

    @jacquestertulien

    3 жыл бұрын

    Glyphhanger*

  • @fatihhayri
    @fatihhayri2 жыл бұрын

    font-family: system-ui; very short system font defination

Келесі