In this video, I walk you through the demo, explain some style linking methods, and test various methods in IE.

Have you ever wondered how reliable style linking is? Many of us don't have definitive ways to test every browser/operating system combination and browser simulators aren't reliable either, especially with web fonts. Even if you did have reliable ways to test, the fake bold and italics that the browser applies can be close enough that it's hard to tell if the linked fonts are being downloaded and used or if the browser is just faking it. This demo will show where style linking is reliable and where it fails. As you will be able to see, we have reached a point where we can reliably use style linking in all modern browsers and even old browsers with the exception of IE8 and lower.

Are You A Newbie?

If you are new to web fonts, this demo will help you unlock the control that style linking gives you over your typography in your website. View my examples and accompanying code to grasp proper techniques. Below each demo, the code used to build the demo is displayed.

Seasoned Programmer?

If you are familiar with style linking, this demo displays the font family Museo Slab style linked using every method I could think of. Use the navigation across the top to learn more and view the demos. You can view it in different browser, and disable the web fonts to see how the web fonts degrade. If you didn't have confidence in style linking before, you will now. You will see that style linking works reliably in all major modern browsers.

About The Demo

The demo is a bare bones set of pages to demonstrate how to link font family styles and allows you to test each method in any browser. It's not meant to be pretty.

The Trick

Because it is so difficult to tell a fake style from the real thing, I modified the "plus" symbol inside all the fonts, replacing it with a unique character that will clearly identify the fonts style.

For example this code:

<em>+</em>

Will actually display my new glyph:

+

If web fonts AREN'T working, you will see a "plus" symbol. If they ARE working, you will see a single character 500i that indicates that it is the 500 weight italic version of the webfont. Each font has it's own unique character.

Another example, since I am using Museo 900 for the headers, this code:

<h1>+ and <em>+</em></h1>

Will actually display like this:

+ and +

In each demo, I purposefully use the plus sign so we can absolutely identify which font each browser loaded.

Font Internals

If you are targeting IE8 and lower, style linking relies on some internal font data. In each demo, I list the relevant data about the font so you can experiment with how the browser reacts. All modern browsers seem to ignore this data, it is only relevant to older versions of IE. To test it out, use our test page. Some fonts have the wrong data internally, this is especially possible with free fonts. You may try running the fonts through our web font generator on Font Squirrel. Often times it detects abnormalities and optimizes them.

Summary

Style linking is widely supported in all modern browsers, and if it is done properly, it degrades relatively well in older IE browsers.

This Page's Code:

At the bottom of each demo/page the actual css is shown for you to study if needed. This page uses numeric style linking.

body { font-family: 'Museo Slab', 'Courier New'; font-weight: normal; } #header { font-weight: 900; } i, em { font-style: italic; } h1, h2, h3, h4, h5, h6 { font-weight: 900; } .weight100 { font-weight: 100; } .weight300 { font-weight: 300; } .weight500 { font-weight: 400; } .weight700 { font-weight: 700; } .weight900 { font-weight: 900; } @font-face { font-family: 'Museo Slab'; src: url('fonts/museo_slab_100-webfont.eot'); src: url('fonts/museo_slab_100-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/museo_slab_100-webfont.woff') format('woff'), url('fonts/museo_slab_100-webfont.ttf') format('truetype'), url('fonts/museo_slab_100-webfont.svg#museo_slab100') format('svg'); font-weight: 100; font-style: normal; } @font-face { font-family: 'Museo Slab'; src: url('fonts/museo_slab_100italic-webfont.eot'); src: url('fonts/museo_slab_100italic-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/museo_slab_100italic-webfont.woff') format('woff'), url('fonts/museo_slab_100italic-webfont.ttf') format('truetype'), url('fonts/museo_slab_100italic-webfont.svg#museo_slab100_italic') format('svg'); font-weight: 100; font-style: italic; } @font-face { font-family: 'Museo Slab'; src: url('fonts/museo_slab_300-webfont.eot'); src: url('fonts/museo_slab_300-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/museo_slab_300-webfont.woff') format('woff'), url('fonts/museo_slab_300-webfont.ttf') format('truetype'), url('fonts/museo_slab_300-webfont.svg#museo_slab300') format('svg'); font-weight: 300; font-style: normal; } @font-face { font-family: 'Museo Slab'; src: url('fonts/museo_slab_300italic-webfont.eot'); src: url('fonts/museo_slab_300italic-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/museo_slab_300italic-webfont.woff') format('woff'), url('fonts/museo_slab_300italic-webfont.ttf') format('truetype'), url('fonts/museo_slab_300italic-webfont.svg#museo_slab300_italic') format('svg'); font-weight: 300; font-style: italic; } @font-face { font-family: 'Museo Slab'; src: url('fonts/museo_slab_500-webfont.eot'); src: url('fonts/museo_slab_500-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/museo_slab_500-webfont.woff') format('woff'), url('fonts/museo_slab_500-webfont.ttf') format('truetype'), url('fonts/museo_slab_500-webfont.svg#museo_slab500') format('svg'); font-weight: 400; font-style: normal; } @font-face { font-family: 'Museo Slab'; src: url('fonts/museo_slab_500italic-webfont.eot'); src: url('fonts/museo_slab_500italic-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/museo_slab_500italic-webfont.woff') format('woff'), url('fonts/museo_slab_500italic-webfont.ttf') format('truetype'), url('fonts/museo_slab_500italic-webfont.svg#museo_slab500_italic') format('svg'); font-weight: 400; font-style: italic; } @font-face { font-family: 'Museo Slab'; src: url('fonts/museo_slab_700-webfont.eot'); src: url('fonts/museo_slab_700-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/museo_slab_700-webfont.woff') format('woff'), url('fonts/museo_slab_700-webfont.ttf') format('truetype'), url('fonts/museo_slab_700-webfont.svg#museo_slab700') format('svg'); font-weight: 700; font-style: normal; } @font-face { font-family: 'Museo Slab'; src: url('fonts/museo_slab_700italic-webfont.eot'); src: url('fonts/museo_slab_700italic-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/museo_slab_700italic-webfont.woff') format('woff'), url('fonts/museo_slab_700italic-webfont.ttf') format('truetype'), url('fonts/museo_slab_700italic-webfont.svg#museo_slab700_italic') format('svg'); font-weight: 700; font-style: italic; } @font-face { font-family: 'Museo Slab'; src: url('fonts/museo_slab_900-webfont.eot'); src: url('fonts/museo_slab_900-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/museo_slab_900-webfont.woff') format('woff'), url('fonts/museo_slab_900-webfont.ttf') format('truetype'), url('fonts/museo_slab_900-webfont.svg#museo_slab900') format('svg'); font-weight: 900; font-style: normal; } @font-face { font-family: 'Museo Slab'; src: url('fonts/museo_slab_900italic-webfont.eot'); src: url('fonts/museo_slab_900italic-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/museo_slab_900italic-webfont.woff') format('woff'), url('fonts/museo_slab_900italic-webfont.ttf') format('truetype'), url('fonts/museo_slab_900italic-webfont.svg#museo_slab900_italic') format('svg'); font-weight: 900; font-style: italic; }