Downloadable Fonts
Posted by Dave Hyatt on Wednesday, October 3rd, 2007 at 10:22 pmWebKit now supports CSS @font-face rules. With font face rules you can specify downloadable custom fonts on your Web pages or alias one font to another. This article on A List Apart describes the feature in detail. All of the examples linked to in that article work in WebKit now.
@font-face is on the WebKit feature branch, and a nightly build of that is available. You can try it out here.
October 4th, 2007 at 12:36 am
[…] Safari: “Downloadable Fonts” WebKit now supports CSS @font-face […]
October 4th, 2007 at 12:43 am
[…] am excited: WebKit now supports CSS @font-face rules! Awesome news to start the day with! Spread the […]
October 4th, 2007 at 1:07 am
This does sound really cool but I have to ask this question – are fonts downloaded from arbitrary URLs a security risk? I honestly have no experience in computer security but I do wonder whether downloadable fonts could be used as an attack vector (I think that’s the term…) on WebKit applications. Is there any way to ensure that fonts are only downloaded from trusted sources?
Love the idea but I have my paranoid hat on today.
October 4th, 2007 at 1:09 am
[…] a sidenote, office neighbour Bramus discovered the news of the day: Webkit now supports a @font-face rules! That brings us one step closer to better typography on the […]
October 4th, 2007 at 1:26 am
Kelmon – yes, they’re an attack vector. But then so is anything you download from the net. For example, Safari used to crash on certain images:
http://www.drunkenblog.com/drunkenblog-archives/000635.html
That theoretically could have been an attack vector. Even plain on HTML theoretically could put Webkit into a buffer overflow or some other exploitable condition; that’s what Michal Zalewski’s mangleme fuzzer was all about:
http://lcamtuf.coredump.cx/mangleme/gallery/
October 4th, 2007 at 1:39 am
[…] The latest Webkit builds now support 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. […]
October 4th, 2007 at 2:42 am
@Robin
Thanks for the information. I trust that these concerns are considered before code is released if this is a problem that can be anticipated. New features are great as long as they don’t enable bad headlines later that undo the good work being done.
October 4th, 2007 at 3:25 am
What great news. If picked up by other browsers, this will further the cause of fonts with open licenses more than anything we’ve seen.
October 4th, 2007 at 3:31 am
kelmon: Thorough security review should be part and parcel of any code check-in to a network-enabled product. Doesn’t always happen like that but you’ve got to have ideals. To be fair to the Webkit team in general they’ve been really good with security issues.
October 4th, 2007 at 6:16 am
What font-face formats are supported? Whatever the environment allows?
October 4th, 2007 at 7:09 am
Geoffrey: this changeset says only TrueType for now:
October 4th, 2007 at 8:18 am
[…] Dave Hyatt: […]
October 4th, 2007 at 9:35 am
While this is great for typefaces with open licences, what about commercial designs? Apple and Microsoft spend a great deal of money for the distribution rights for the typefaces bundled with their operating systems, but this does not extend to their users. What is stopping someone from inadvertently distributing Gill Sans (bundled with OS X for free, but $479 to buy the family from Linotype) to the rest of the world?
I know there is nothing stopping someone from taking those same files and posting them to the web or a P2P network, but people doing that know they are distributing the files (even if they may not understand the legal implications). Someone who just wants their website to look a little better may not realize they are illegally distributing a licenced piece of software (font files have been defined as software by US courts and are subject to copyright laws).
October 4th, 2007 at 11:05 am
[…] Embeddable fonts in webpages; we only had to wait nine years for a browser to implement this. Yet another reason to hold my breath for a WebKit browser on Xorg. […]
October 4th, 2007 at 12:13 pm
[…] This is exciting news. Webkit, Apple’s publicly available testing ground for future Safari features, now supports web fonts. You can read more about how web fonts work here. […]
October 4th, 2007 at 1:12 pm
Congratulations—WebKit is really starting to pwn Gecko now. It’ll be great to see WebKit as an option in Epiphany.
October 4th, 2007 at 1:20 pm
@font-face dans WebKit…
Depuis cette nuit WebKit supporte la règle @font-face qui permet entre autre d’indiquer une adresse URI pointant vers les données d’une police (voir la spec sur @font-face). En clair on peut spécifier l’URI d’une police à utiliser et par consé…
October 4th, 2007 at 1:56 pm
[…] October 4th, 2007Downloadable fonts (finally!) Dave Hyatt posted it yesterday and I read it on Typographica today: Webkit (the application framework that is the basis of Mac OS […]
October 4th, 2007 at 2:09 pm
¡Tipografías descargables para navegadores web, al fin!…
Lo publicaba ayer Dave Hyatt en el blog de Webkit (el motor del navegador Safari, que podría estar disponible para KDE): ya se encuentra disponible una versión que admite la propiedad @font-face, que le indica al navegador el fichero TrueType que deb…
October 4th, 2007 at 2:23 pm
Thank you!, thank you!, thank you!, thank you!, thank you!
I’ve been waiting for this for a long time. Why it took so long?, I don’t know, but I’ve been thinking about this probably since 1996.
I hope other browsers jump on the wagon too.
Thank you very much, indeed!
You made one happy designer today… 😀
October 4th, 2007 at 6:20 pm
[…] web is about to become more beautiful/hideous. Dave Hyatt of the WebKit engine used by Safari: WebKit now supports CSS @font-face rules. With font face rules […]
October 4th, 2007 at 10:48 pm
Adobe has developed a tool for use with their Mars project (http://blogs.adobe.com/mars/2007/10/font_obfuscator_tool.html) that encrypts a font file and embeds a DocumentID. The font can then only be used in the document with the matching ID.
Could something like this be used with @font-face? Say I want to include a commercial typeface in my webpage. Rather than post the raw .ttf which anyone could copy, could I make an encrypted copy the file embedded with the URL of my specific page or site. If the browser confirms that the URLs match, only then would it decrypt and display the font.
This “encrypted font” technique has actually been used by Microsoft with their EOT font format since IE4.
October 5th, 2007 at 1:36 pm
[…] Rejoice, for the blogosphere bears good news today – Webkit (the engine behind Safari) joins Opera in supporting @font-face rules in nightly builds. This means it includes the necessary functionality to link to […]
October 5th, 2007 at 3:59 pm
[…] Apple cares about typography, so it only makes sense that Webkit has joined Opera in supporting @font-face. […]
October 5th, 2007 at 4:47 pm
[…] ”WebKit now supports CSS @font-face rules” […]
October 5th, 2007 at 9:02 pm
[…] Apple cares about typography, so it only makes sense that Webkit has joined Opera in supporting @font-face. […]
October 6th, 2007 at 4:59 am
Pretty cool. Only a shame those a-list-apart-examples don’t really work..
The rendered html looks exactly as in Camino and Firefox. And I’m using today’s build of WebKit…
October 6th, 2007 at 9:08 am
doekman: You need to download a nightly build of the feature branch. This is not in normal nightly builds of the trunk. Follow the link in the blog post.
October 6th, 2007 at 12:17 pm
Hyatt: I completely missed that last line! I must be a st*p*d consumer, or something…
But it really looks cool! Font rendering is a bit different from Prince, but that must be the Apple Windows thing?
October 8th, 2007 at 6:13 am
[…] latest nightly builds of WebKit now support downloadable fonts via @font-face rules. This too, is pretty big news. The ability to unobtrusively include a […]
October 10th, 2007 at 3:21 am
Can’t wait to use it in favour of WebKit users. It’s good to see that WebKit moves further than just Acid2 compatibility
October 11th, 2007 at 2:34 am
Just had a bit of the time to test it. None of the samples on A List Apart really worked and I’m running the latest nightly. Am I missing out something? Could it be a bug?
October 11th, 2007 at 10:07 am
Note that it’s only available in nightly builds of the feature branch. Follow the link at the end of the article to reach the download page for that branch.
October 11th, 2007 at 7:49 pm
Any possibility of a pre-compiled feature branch binary for Windows?
October 12th, 2007 at 3:00 am
I’m working on getting that set up. It should be available in a few days time.
October 12th, 2007 at 11:18 pm
[…] Surfin’ Safari – Blog Archive » Downloadable Fonts via some bigot (tags: typography fonts Apple safari web-design browsers HTML software design) […]
October 12th, 2007 at 11:37 pm
Got it working just fine. Support for Web Fonts sounds splendid so far. Let’s hope Mozilla catches up.
Please find the article on WebKit’s Web Fonts support here.
October 23rd, 2007 at 10:39 pm
This is amazing, and I am happy to see it in the main trunk now. I noticed that the fonts in the “A List Apart” article download pretty quickly, but I am concerned about people with slower connections. Will a substitute font be shown while the font downloads (something from the font-face list)? I believe IE did that with their implementation.
November 15th, 2007 at 4:27 am
[…] talking about a lot of great new features in the latest development trunk of WebKit – features like web fonts, client-side database storage, CSS transforms and CSS animation. But I’d like to take a step […]
November 15th, 2007 at 6:05 am
[…] talking about a lot of great new features in the latest development trunk of WebKit – features like web fonts, client-side database storage, CSS transforms and CSS animation. These features will likely make it […]
November 15th, 2007 at 5:27 pm
[…] Downloadable fonts let designers specify downloadable custom fonts via CSS @font-face […]
December 2nd, 2007 at 8:12 pm
[…] talking about a lot of great new features in the latest development trunk of WebKit – features like web fonts, client-side database storage, CSS transforms and CSS animation. These features will likely make it […]
December 3rd, 2007 at 11:18 pm
[…] Safari has always been a great place to get information about WebKit, from descriptions of the many new features being added to technical discussions of engine internals to announcements of WebKit […]
December 28th, 2007 at 1:39 am
Ok, I know I’m late into this topic, but here goes…
Is there any support for fonts (CSS @font-face preferred) within the canvas element?
It really is a pita to have to keep creating transparent png files for each letter you might want to use on a canvas (and then pre-load them all too!)
Judging by the way the font is downloaded it seems fairly simple to then link this into the canvas object. Please!!
December 28th, 2007 at 6:59 am
Also late here…
If you look at the reporting of this news (Google News for ‘WebKit @font-face’), it’s all about how WebKit got the support now in addition to Opera. I’d just like to point out how completely wrong this is.
IE has long had support for web fonts, but not .ttf fonts, only .eot ones. Similarly Mozilla has had support for a long time, but not for .ttf. And Opera doesn’t support @font-face at all, not even their latest preview version…
So actually it’s WebKit first to have useful web font support.