From the course: Choosing and Using Web Fonts

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Setting fallback fonts

Setting fallback fonts

From the course: Choosing and Using Web Fonts

Start my 1-month free trial

Setting fallback fonts

Our script version of the library book sale page looks great, but before we move on I want to check the fallback fonts. I always set fallback fonts so I have some control over what fonts load if my Web fonts don't. But in this case I want to take a couple extra steps to make sure they work the way I want them to. I'm trying to control the heading. I want to create a specific rhythm. I want the first line to end with one book and the last line to contain all three words, one potato chip. I forced this using br tags. This isn't great syntax and I don't usually try to force line breaks, but this heading is the main element in the page. We aren't using any images so I want it to be perfect. But when we try to control line breaks we have to be aware of what can go wrong. You'll remember we set the heading a couple of pixel smaller than its maximum size. So if a browser slightly expands the letter spacing the words will still fit on each line. Now we need to make sure the fallback fonts…

Contents