New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Making various weights and styles work correctly across different browsers

From: Choosing and Using Web Fonts

Video: Making various weights and styles work correctly across different browsers

Looking at the refined Crimson Text version of our Web page, it looks like we're done, but we're not. What you can't tell by looking at my screen, because I'm on a Mac using Firefox, is that the way Google Web Fonts tells you to use their system doesn't work correctly on Internet Explorer 7 or 8. Take a look at this screenshot of the same page, viewed on Windows 7, Internet Explorer 8. Look at the italics in the quote about libraries. They are fake.

Making various weights and styles work correctly across different browsers

Looking at the refined Crimson Text version of our Web page, it looks like we're done, but we're not. What you can't tell by looking at my screen, because I'm on a Mac using Firefox, is that the way Google Web Fonts tells you to use their system doesn't work correctly on Internet Explorer 7 or 8. Take a look at this screenshot of the same page, viewed on Windows 7, Internet Explorer 8. Look at the italics in the quote about libraries. They are fake.

If you're new to looking at fonts, you may not realize they are fake, but the A and E give it away immediately. Most true italics have a single-decker A, not the double-decker one like we can see here, and Crimson Text E is softer and rounder. The fake italics has neither of these things. It uses the regular version of the text, and just slants it over. You can also see the difference in the Y and F very clearly. Let's toggle back to our Web page.

There is the F with the tail, and the Y with the curved stroke, and the fake italic has neither of these things. There are two reasons why fake italics aren't good; one is aesthetic. If we just spent ten minutes getting the italics to look good, it's frustrating that people using Internet Explorer 7 and 8 can't see them. The second reason, and perhaps more importantly, is legibility. Now, it doesn't matter quite as much with Crimson, because quite frankly, Crimson's italics are pretty narrow, and not that easy as italics to read.

But later, as we move out of the older style fonts, and into more contemporary fonts, you'll see some italics are actually quite open, and very easy to read. When those italics convert to the fake italic, legibility is compromised. The change in the italics is more immediately recognizable, but the bold is fake too. Internet Explorer just makes the font look bold by slightly stretching the vertical strokes, so they are a bit lighter. The semi-bold italic sentence about the Bay Road businesses has both a fake bold and a fake italic.

It has been both stretched and slanted, and the results are not delightful. So why does this happen? We'll open the file from the last lesson, and let's look at the code. See how the Google code surfs up all four versions of Crimson Text in the same line of code? Internet Explorer 7 and 8 only recognize one font surfed up; the first one. All the other weights and styles are then faked by the browser. Fixing this is relatively easy. First, immediately following the current code, let's put in a return here, and we're going to add the following conditional comment.

We're going to say a conditional comment of if, Internet Explorer, and then end if. Then what we're going to do is go back to Google Web Fonts, and get the code for each individual weight and style. So now we have normal 400 selected, copy; back in our document, I'll paste that in. Toggle back to Google Web Fonts, choose the Normal 400 italic, copy that, paste it, choose just the semi-bold, copy that, and paste it into my document.

And now the semi-bold italic, select that, copy it, toggle back, and paste it, and then we'll save this. Go back into the browser and refresh this, and if you're not using Internet Explorer, you didn't see anything change, but it's now working in both Internet Explorer 7 and 8. I'll show you a screenshot of the fixed version. And this is what you'd see if you were using Internet Explorer 7 and 8.

The italic is fixed, as is the bold. Unfortunately, we also see that there is a bit of a spacing problem in the Crimson italic on Internet Explorer 7 and 8. Now, you might wonder why I had you use a conditional comment, and only serve the individual weights and fonts for Internet Explorer. Wouldn't that approach work in all other browsers? Not necessarily. If you didn't use the conditional comment, the fonts wouldn't work properly in Opera. When faced with multiple weights and styles of a single font, Opera always uses the last weight and style of the font pulled in from Google.

I can show you what that would look like as well. So if we didn't use the conditional comment, Opera would have pulled in the last weight and style, which was the semi-bold italic, and Opera would have used it for all the text on the page. In doing it the way that we did, Opera also works correctly. So now our old style font works properly across every srowser that supports Web fonts. Even though Google Web fonts takes care of most of the technological aspects of using Web fonts, it's still good to keep track of how things are working cross-browser, and be willing to make changes to how you use their service.

Show transcript

This video is part of

Image for Choosing and Using Web Fonts
Choosing and Using Web Fonts

89 video lessons · 6837 viewers

Laura Franz
Author

 
Expand all | Collapse all
  1. 4m 41s
    1. Welcome
      1m 2s
    2. What you should know before watching this course
      1m 52s
    3. Using the exercise files
      1m 47s
  2. 14m 55s
    1. Recognizing the anatomy of letters
      4m 17s
    2. Understanding font classification
      4m 38s
    3. Finding and testing web fonts
      3m 41s
    4. Identifying common problems in fonts
      2m 19s
  3. 43m 43s
    1. Understanding Venetian fonts
      4m 0s
    2. Identifying a Venetian font
      4m 46s
    3. Understanding handwritten letters
      3m 22s
    4. Choosing a Venetian font
      3m 47s
    5. Creating a Typekit account and building a kit
      3m 43s
    6. Adding a Venetian font (Calluna) to your kit
      2m 51s
    7. Applying Calluna to your web site
      5m 54s
    8. Troubleshooting Typekit fonts that don't load
      2m 2s
    9. Changing styling as necessary to improve the readability of the text
      4m 25s
    10. Working with more than four styles in Typekit
      5m 22s
    11. Looking at how using a Venetian font affects the look and feel of a web page
      3m 31s
  4. 32m 53s
    1. Identifying an Old Style font
      6m 26s
    2. Choosing an Old Style font
      4m 30s
    3. Applying Crimson Text to a web site using Google web fonts
      3m 8s
    4. Changing styling as necessary to improve the readability of the text
      9m 20s
    5. Making various weights and styles work correctly across different browsers
      5m 16s
    6. Looking at how using an Old Style font affects the look and feel of a web page
      4m 13s
  5. 21m 12s
    1. Identifying a Transitional font
      5m 10s
    2. Choosing a Transitional font
      6m 36s
    3. Applying PT Sans to a site via Typekit
      2m 57s
    4. Changing styling as necessary to improve the readability of the text
      2m 59s
    5. Looking at how using a Transitional font affects the look and feel of a web page
      3m 30s
  6. 16m 58s
    1. Identifying a Modern font
      7m 50s
    2. Choosing a Modern font
      4m 0s
    3. Using Typekit to find and test web fonts
      5m 8s
  7. 26m 52s
    1. Identifying a Slab Serif font
      4m 30s
    2. Choosing a Slab Serif font
      3m 58s
    3. Deleting a font from your Typekit
      3m 1s
    4. Exploring a font with multiple weights and styles
      9m 41s
    5. Looking at how using a Slab Serif font affects the look and feel of a web page
      5m 42s
  8. 26m 52s
    1. Identifying "Other" Serif fonts
      5m 28s
    2. Choosing "Other" Serif fonts
      10m 12s
    3. Using a font without an italic
      7m 6s
    4. Looking at how using an "Other" Serif font affects the look and feel of a web page
      4m 6s
  9. 20m 34s
    1. Identifying a Transitional Sans Serif font
      4m 29s
    2. Choosing a Transitional Sans Serif font
      5m 14s
    3. Changing styling to improve the readability of text
      6m 31s
    4. Looking at how using a Transitional Sans Serif font affects the look and feel of a web page
      4m 20s
  10. 31m 23s
    1. Identifying a Geometric Sans Serif font
      2m 51s
    2. Choosing a Geometric Sans Serif font
      4m 33s
    3. Downloading a free font licensed for use on the web
      3m 53s
    4. Using Font Squirrel to create an @font-face kit
      5m 12s
    5. Adding the @font-face syntax to the CSS
      2m 57s
    6. Implementing the font family in the CSS
      5m 29s
    7. Changing styling as necessary to improve the readability of the text
      3m 56s
    8. Looking at how using a Geometric Sans Serif font affects the look and feel of a web page
      2m 32s
  11. 21m 3s
    1. Identifying a Humanist Sans Serif font
      4m 18s
    2. Choosing a Humanist Sans Serif font
      7m 23s
    3. Changing styling as necessary to improve the readability of the text
      5m 32s
    4. Looking at how using a Humanist Sans Serif font affects the look and feel of a web page
      3m 50s
  12. 18m 28s
    1. Understanding handwritten fonts
      3m 4s
    2. Choosing a handwritten font
      8m 17s
    3. Looking at how using a handwritten font affects the look and feel of a web page
      7m 7s
  13. 33m 2s
    1. Understanding what to look for when pairing fonts
      6m 58s
    2. Using one font for headings and another for text
      6m 6s
    3. Using different fonts for different kinds of information on the page
      8m 38s
    4. Mixing and matching fonts within text
      3m 48s
    5. Looking at how using two fonts affects the look and feel of a web page
      7m 32s
  14. 23m 34s
    1. Understanding Script fonts
      2m 19s
    2. Choosing a Script font for display use
      8m 12s
    3. Changing styling as necessary to improve the form and placement of letters on the page
      3m 33s
    4. Choosing a second font to pair with the Script Display font
      3m 42s
    5. Incorporating a second font with the Script Display font
      2m 53s
    6. Setting fallback fonts
      2m 55s
  15. 26m 38s
    1. Understanding Wood Type fonts
      3m 25s
    2. Choosing a Wood Type font for display use
      8m 35s
    3. Changing styling as necessary to improve the form and placement of letters on the page
      4m 57s
    4. Choosing a second font to pair with the Wood Type font
      2m 28s
    5. Incorporating a second font with the Wood Type display font
      4m 42s
    6. Setting fallback fonts
      2m 31s
  16. 14m 58s
    1. Choosing an Art Deco font for display use
      2m 45s
    2. Changing styling as necessary to improve the form and placement of letters on the page
      3m 51s
    3. Choosing a second font to pair with the Art Deco font
      2m 37s
    4. Incorporating a second font with the Art Deco display font
      2m 57s
    5. Setting fallback fonts
      2m 48s
  17. 27m 38s
    1. Choosing a Futuristic font for display use
      5m 33s
    2. Applying the Futuristic font and changing the styling as necessary to improve the form and placement of letters on the page
      6m 40s
    3. Choosing a second font to pair with the Futuristic font
      2m 48s
    4. Incorporating a second font with the Futuristic display font
      4m 21s
    5. Setting fallback fonts
      2m 22s
    6. Looking at the set of four ads
      5m 54s
  18. 7m 29s
    1. Exploring resources and goodbye
      7m 29s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.