Webkit has web fonts support

The latest Webkit builds now support an open implementation of the @font-face rule, which we wrote about some time ago. Recent articles by Håkon Wium Lie had indicated that Opera might be first to market with this, but the Webkit team seem to have beaten them to it.

In short, @font-face allows you to download fonts to the visitor’s browser, meaning you can use any licensed font to display your pages. An example of use would be:

@font-face {
font-family: 'The New Font';
src: url('http://www.example.net/newfont/');
}

It’s a step forward for the web, and I’m delighted it’s here. Congratulations to the Webkit team, and here’s hoping that Opera push forward with their plans to implement it too. It seems like Firefox 3 won’t support this rule, so late 2008 may be the earliest we see this in Mozilla browsers.

As for Internet Explorer, they’ve actually implemented @font-face since version 4! However, it only works with their proprietary font format, .eot, and never took off. I wonder if they will reimplement it with Open- or True-Type fonts now.

@font-face isn’t actually new in CSS 3, it’s been around since CSS 2. However, as it’s never been properly introduced I think it’s okay to include it here!

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Reddit
  • Mixx
  • TwitThis
  • E-mail this story to a friend!
  • Print this article!
October 4th, 2007 by Peter Gasston in Browsers, Declarations. You can leave a response, or trackback from your own site.

25 Comments to “Webkit has web fonts support”

  1. Daniel Luz Says:

    Was it dropped in later versions? I’m pretty sure it’s still working on IE7; I remember seeing a web version of Candara on a Microsoft-er blog. (Whose blog didn’t look the same anywhere else, as he didn’t set the original Candara as an alternative; better yet, Candara could be the primary font, so that those who have it don’t have to download a web-Candara.)

  2. Peter Gasston Says:

    Actually you’re right; it’s still supported in IE7, albeit only in the EOT format.

    http://www.microsoft.com/typography/web/embedding/

    I’ve amended the post accordingly.

  3. Fatih Hayrioğlu’nun not defteri » 04 Ekim 2007 Web’den Seçme Haberler Says:

    [...] CSS3.0 ile birlikte kullanıcıya istediğimiz yazı tipini kullandırabilecekmişiz. Mozilla şimdilik desteklemiyor ancak 2008 içinde desteklemesi bekleniyormuş. Burada bir iki sorun daha var ama bu font işine kesin bir çözüm bulmak gerekiyor. sFIR bir çözüm ama daha basit bir çözüm gerekiyor. Bağlantı [...]

  4. Andrey Petrov Says:

    Great news!
    Hope that Opera also implements it soon.
    And than it will be a question who will release this feature first. ;)

  5. Kevin Says:

    So is this just embedding regular font files (.ttf and .otf)? If so, are there any plans to support harder to copy, maybe sub-setted font formats (SVG Glyphs perhaps)?

    I ask because many higher end font licenses specifically mention embedding in webpages (meaning, it’s not allowed), and it would be nice to offer at least a hurdle that prevents these fonts from being easily pirated. Converting the font to eot, or something based on SVG, would do that nicely. It could make it at least as technically difficult as taking font glyphs (and metrics, etc.) from SVG, SWF, or PDF files.

    It could become easier to convince some nervous type designers to release licenses that allow embedding in webpages, as well as gain some bandwidth performance increases by doing that.

  6. Peter Gasston Says:

    This is embedding regular TTF files, AFAIK. .eot has been more or less discontinued, as far as I can see; the website hasn’t been updated for four years, and the programme to convert fonts isn’t made for Windows XP. Added to this, the other browser manufacturers have shown no interest in the proprietary format, perhaps due to licensing issues.

    For now, I’ll happily accept TTF & OTF.

  7. Joost de Valk Says:

    The big question is: who’s going to create a conditional SIFR now? :)

  8. Daniel Aleksandersen Says:

    This is very cool! I am glad to see support for web font faces are finally coming along!

  9. Haruka aka Seremel Says:

    Hope this behavior can be disabled in browsers…

  10. Ahmad Alfy Says:

    That’s definitly gonna be a great addition!
    I say lets worry about the liscences and piracy later.. There are tons of free for use fonts we really want to implement on our websites

  11. Peter Gasston Says:

    You know what I think would be a great way to head off a lot of problems with people using fonts illegally and in un-usable ways?

    DON’T IMPLEMENT @FONT-FACE IN WYSIWYG EDITORS.

    That way you won’t get amateurs - and I mean that in a strictly non-demeaning sense - filling sites with ugly or unlicensed fonts. Anyone who knows about font licensing and design could still use @font-face by coding it manually, but fewer garish and illegal fonts would make it online.

  12. Craig Says:

    This is going to open up a potentially disastrous can of worms.

    Already the possibility of a thousand different unreadable fonts is flashing through my head…

    It will be a nice feature for very rare times, but majority of the time I like the fact that fonts are limited on the internet, it makes reading a whole lot easier.

  13. Peter Gasston Says:

    First, you’ll no doubt be able to switch this feature off. Second, I can’t imagine it getting widespread use beyond titles and headings, at least in the long term. Third, if a site is unreadable the feedback will soon let the owner know.

  14. Kevin Says:

    Craig, I really have to respond to what you said, “This is going to open up a potentially disastrous can of worms.” I don’t understand why that kind of argument is always made. The same kinds of terrible, impossible to understand designs could be achieved using gifs, jpegs, pngs, SVG, Flash, blink tags, etc. yet no one thinks those features should be removed from browsers. Why does that argument always come up?

    The simple fact of the matter is that web site owners are disincentivized to make their sites suck. Sucky sites get no love from visitors. :-)

  15. Tripix.net » Blog Archive » Fuentes descargables desde CSS… ahora en WebKit Says:

    [...] CSS3.info [...]

  16. fantasai Says:

    Aside from the piracy issue, the major hurdle for implementation is security. Evil fonts can actually crash your system or compromise it in other ways: some font formats contain executable code.

  17. Alison Foxall Says:

    “Sucky sites get no love from visitors. :-)”

    I agree! :P I’m very excited at this news, great post! I think as more browsers start opening up to this, we’ll see how it goes, and who knows, maybe it won’t be so bad with the licensing stuff. Or it could be a disaster like p2p and sharing music that people didn’t pay for. I don’t think it would be that hard to secure a font in a folder though (on a programming standpoint)…

  18. Peter Gasston Says:

    “Aside from the piracy issue, the major hurdle for implementation is security.” I’d say that was a browser maker problem, not an end-user problem.

  19. n-blue Says:

    Great news for forgothen feature is come back. I do love to play with web font. Btw, there is no today browser that support this (except for webkit). Firefox may come but not with FF3, I don’t see it work on Alpha 8. Opera 9.5, now in development, in the latest build there is no this feature but hope some time later. IE7 not support any things about CSS3. IE teams siad some time ago they will support CSS3 in the next version, IE8, but how long it take.

    Web font togther with rounded border is great and welcome. My hand on CSS will come more clean. :D

  20. sweb Says:

    That’s so useful for Persian languege!

    thanks. :D

  21. Ain Tohvri Says:

    A test case on Web Fonts support in WebKit is also available from flash tekkie

  22. TL Says:

    Personally I’m more interested in @font-face for the purpose of providing metrics that would be useful for finding good substitutions, rather than downloading the “real font”. I think font-size-adjust is a good start toward this, but sometimes it doesn’t address anything other than x-height. Being able to specify the weight, spacing, etc of the first choice font so that substitutes can be found more intelligently would be great.

  23. Imran Says:

    Hi friends i have make this site using CSS but i have one small problem with font, whatever Css i have applied for the overall site is looking fine in IE but in Mozilla browser it is not supporting properlly is any body tell me what i have to do with font name and size which will support the font on all browser?

  24. True Font Family Says:

    As for weird and unreadable fonts, you can already make your page unreadable if you’d like. You can make it scroll, scream, blink and use annoying animated gifs. But those pages are not the standard and most people will know how to use a wide variety of fonts or loose visitors.

    As for web fonts. You can use sIFR, but IMHO that still requires too much manual work. Preparing Flash files and a bit of specific JavaScript.

    I’ve written a combination of JavaScript and PHP, that reads CSS through JavaScript and replaces text nodes with images of that text using TrueType fonts. It works on all major browsers (IE 5+/Firefox 1+/Opera 8+/Safari 3 Windows, haven’t tried Mac) and when TrueType fonts are finally available you do not need to make any adjustments to your stylesheets. It supports @font-face as well.

    You do need a PHP capable webserver at the moment for the rendering of the images.

    In comparison to sIFR it probably requires a bit more bandwidth, but you get to use almost all CSS text related properties. It requires no changes to your HTML code, and it does not require any manual work.

    http://www.truefontfamily.com/

    I posted this in the interview with Håkon Wium Lie also, but I think it is relevant here as well.

  25. Safari 3.1 - Quick Thoughts | K-Squared Ramblings Says:

    [...] believe this is the first browser released that supports embedding TrueType fonts. (IE has been able to embed fonts for years, but you had to convert them first, which may be why [...]

Leave a Comment