Python Web Apps that Fly with CDNs Transcripts
Chapter: Fonts
Lecture: What does API compatible mean?

Login or purchase this course to watch this video and the rest of the course contents.
0:00 So if you're not super familiar with Google Fonts, and I said, "Bunny.net fonts are API compliant or compatible or interchangeable with Google Fonts,"
0:11 you might be like, "I don't know what that means. I didn't know fonts have APIs." They don't, but the way in which you get them on your page does.
0:18 So here's an example of how we might use Google Fonts. So what you do is you go to the Google Fonts page and you select all the stuff you want.
0:26 In this case, we wanted a breezy and Albert-sans, and we wanted the thickness or strength
0:34 400 and 400 italics for the first one, and 100 and 600, so a thin and a bold for the Albert-sans.
0:40 And if we put that kind of information, these family and the sizes and strength, and put
0:48 pipes separating them, this is how we tell Google Fonts in one request to give us these
0:53 four different font families that then we can use throughout our site. So if we want to use bunny.net fonts, here is the magic that you have to do.
1:05 You replace fonts.googleapis.com with fonts.bunny.net. Done. That's it. And then it will work exactly the same.
1:14 So upgrading or migrating to bunny.net fonts is super duper easy. And we're going to go write some code next to do this in our example, but as you can
1:24 see, really, really easy.


Talk Python's Mastodon Michael Kennedy's Mastodon