Candy, A Journal by a James

CSS3 @font-face browser support table

It’s time for a CSS3 @font-face browser sup­port table. One that doc­u­ments spe­cific­ally how browsers act when either the whole font fam­ily is spe­cified (reg­u­lar, italic, bold, bold-italic & small-caps) or only the reg­u­lar ver­sion of the font is spe­cified. The test-case that this based on uses the ideal, easi­est (lazi­est) imple­ment­a­tion and can be found on its own page here.

Here’s the res­ults of how cur­rent browsers render the test case, com­pared to the ref­er­ence rendering.

Can the browser pick up the style natively?

Firefox 3.6 Safari 4 Chrome 5 Opera 10.5a
Regular (Normal) Yes Yes Yes Yes
Italic Yes Yes Yes Yes
Bold Yes Yes Yes Yes
Bold-Italic Yes Yes Yes Yes
Small-Caps Emulates Fallback system-font Fallback system-font Emulates
Extras? Ligatures! - - Ligatures!

Can the browser emu­late from the reg­u­lar version?

Firefox 3.6 Safari 4 Chrome 5 Opera 10.5a
Regular (Normal) (implied) (implied) (implied) (implied)
Italic Yes Fallback to regular-style Fallback to regular-style Fallback to regular-style
Bold Yes Fallback to regular-style Fallback to regular-style Fallback to regular-style
Bold-Italic Yes Fallback to regular-style Fallback to regular-style Fallback to regular-style
Small-Caps Yes Fallback system-font Fallback system-font Yes
Extras? Ligatures! - - Ligatures!

The most up to date sup­port table, with pretty col­ours, can always be found on its own page along­side the test case. It also has more notes on lig­at­ure and small-caps support.

Why is fall­ing back to reg­u­lar style so bad?

It makes sen­tences full of expres­sion look like sen­tences full of expres­sion. Thus remov­ing part of the typo­graph­ical ele­ments of a text, whereas @font-face is meant to embel­lish it typographically.

So what does this mean we should do?

Browser developers:

  • Please work on emu­lat­ing bold, italic, bold-italic, etc. when they’re not present. Browsers do this already when it comes to system-fonts, which means web developers expect this to work. Falling back to the reg­u­lar style (font-style:normal) is hor­rible as you lose all styl­ing in a text.
  • Also give some thought to pick­ing up “font-variant:small-caps;” in your @font-face code. It’s the only way to ensure proper fall-back. Emulating, like Firefox & Opera do, is a step for­ward, but it’d be a pity to stop there.
  • If HTML 5 has taught us any­thing, it’s that browsers should be more bul­let­proof, not web designer’s code. Also: ask­ing web developers to spe­cify as little as pos­sible is a better.

Web design­ers:

  • Using @font-face when you only have the reg­u­lar ver­sion of a font at your dis­posal is not a good idea. Especially for body text.
  • If you use small-caps text, chances are vis­it­ors will see the fall­back system-font. So make sure you spe­cify a system-font that matches your @font-face font nicely when rendered as small-caps. (The test-case uses an espe­cially jar­ring one on purpose.)
  • Using a (less lazy, less prac­tical) more bul­let­proof way of spe­cify­ing your @font-face fonts is recom­men­ded (alas) for now.

3 Responses to “CSS3 @font-face browser support table”

  1. It’s really time for CSS3 and @font-face is one of the most inter­est­ing fea­tures. Thx for shar­ing this browser-support-overview!

  2. Richard Fink says:

    James,
    I respon­ded to your com­ment on Readable Web.
    Will be look­ing at this more closely. And thanks for it, too.
    Helpful.
    BTW — using @font-face when you only have the reg­u­lar ver­sion of a font is per­fectly fine. I take issue with char­ac­ter­iz­ing it as “not a good idea”. Too sweep­ing.
    If someone is using a font for head­ings, style vari­ations are sel­dom an issue. I just fear that people will get the wrong idea and shy away from @font-face entirely.
    I do agree that body text is a spe­cial case and when someone exper­i­ments with it and has only the reg­u­lar mem­ber of the font fam­ily, they’ll find out pretty quick what’s up.

    Rich

    • Richard Fink: [..]
      BTW  —  using @font-face when you only have the reg­u­lar ver­sion of a font is per­fectly fine. I take issue with char­ac­ter­iz­ing it as “not a good idea”. Too sweeping.

      It should be fine, but it isn’t due to the silly fall­back browsers do.

      If someone is using a font for head­ings, style vari­ations are sel­dom an issue. I just fear that people will get the wrong idea and shy away from @font-face entirely.
      I do agree that body text is a spe­cial case and when someone exper­i­ments with it and has only the reg­u­lar mem­ber of the font fam­ily, they’ll find out pretty quick what’s up.

      Headings are often bold. You see a lot of examples pop­ping up with people simply declar­ing the BoldVersion.ttf dir­ectly. Which is silly, as it’ll fall­back to the reg­u­lar ver­sion on non-font-face sup­port­ing browsers.

      The point is not to shy people away from @font-face, but rather to get browser sup­port to a good enough level so that web developers don’t have to worry about back­wards compatibility.