WebKit is leading the run for CSS3
Posted on 12th October 2007 in Browsers, CSS |
Despite Mozilla’s enormous effort to Firefox, WebKit developers have proven their Acid2 compatible framework is flexible enough for the Safari’s latest success to prevail. Newest CSS3 developments show off.
While a number of modules in CSS3 are still questionable and software providers are struggling with CSS2.1 implementations, CSS3 is surely one of the most awaited deployments across web designers. It is not merely about the looks, but an advantage on the tech side as well.
For the first time WebKit has introduced the support for web fonts. What it basically does is that it renders the downloaded font instead of the ones you have got on your system. As Cascading Style Sheet’s main purpose is to provide lightweight and accessible design for the web industry, it would make a whole lot of sense in CSS3. It would also significantly cut the traffic (some sites use Flash to display headlines with custom fonts) and put the whole web a leap forward in terms of SEO. Imagine how many sites could upgrade their headers that are currently using images mainly because the custom font outline? And even though some of the criticism focuses on the legal issues, such as copyrighted material getting exposed on the internet, it would still be a huge technical improvement.
On the code level it’s all very simple. Let’s fire away with a piece of code:
@font-face { font-family:"Aardvark Cafe"; src:url('http://tekkie.flashbit.net/tmp/AARDC___.TTF') format("truetype"); } h1 { font-family:"Aardvark Cafe", sans-serif; }
That kind of CSS would produce a page like this (in the right context of course):

Please also see the respective HTML. It is extremely straightforward and can be implemented in a few seconds.
CSS3 Web Fonts module is currently in the status of Working Draft 2 and even though it’s a low priority development let’s hope it gets finalized and implemented by the leading browser developers. WebKit’s team has put up a very good initiative.
To test out web fonts click here to download WebKit.

10 Responses
This is a good step forward. I have been waiting for such advances for a while. Hopefully Mozilla will also make more of a headway for provisionary CSS3 rules. Unfortunatly with IE7 not even up to speed with CSS 2.1 it will probably be a while before we can really use any of this stuff.
I wonder if this will cause any issues with font copyright. It would be easy for anyone to access commercial fonts if they are defined in the CSS. One solution would be to use PHP or another server-side language to block direct access to the file.
Yes, it’s definitely a good step and hopefully WebKit’s initiative will be sufficient for W3C to get it finalized.
Mozilla’s latest Gran Paradiso Alpha 7 doesn’t support Web Fonts but I do hope the competition will trigger them to go for it.
Internet Explorer on the other hand will probably lag behind as it usually does. My hope is that Microsoft’s lead on the browser market will continue to shrink from what it is significantly.
Web Fonts will raise a lot of copyright issues but so does everything else, e.g. pirated images.
Now this is really useful. I guess it’s so long logos
Just for the record: Alpha 8 of Firefox 3 doesn’t support Web Fonts either.
You can use TrueType web fonts through @font-face already with any major browser (IE/Firefox/Netscape/Mozilla/Opera/Safari) using True Font Family.
Check out the example from this article in your own browser here
Feel free to check out the HTML source code. The extra line of JavaScript is needed to enable @font-face which is disabled by default. This will prevent the script from checking for imported fonts and makes it slightly faster.
For more information: http://www.truefontfamily.com/
True Font Family is a neat solution. Pretty similar to Flash font embedding technique that is used for headlines on various sites.
BUT there are few drawbacks that you don’t have with Cascading Style Sheets:
Search Engine Optimization.
As the text is provided in embedded movie or in image we lose the advantage on indexing. Googlebot is not going to consider an image or Flash movie in a way it does with h1-h6 tags. Readability and structuring matters.
Server load.
On any high-traffic site live gdlib rendering would have quite an impact on performance. In these terms Flash would be a better choice.
Traffic load.
CSS is a lightweight method to improve visual detail and was introduced to get spacer images, headline images and all of that off the web. These are the benefits. The above mentioned PHP and Flash methods will both increase the megabytes on the line significantly.
I agree and disagree with you. But we can both agree that browsers should natively support TrueType web fonts.
Search Engine Optimization:
The HTML source is clean and free from any images or Flash movies. When the JavaScript is fired elements are replaced using DHTML. Search engines do not do this. They just see the HTML. Check the google guidelines. They tell to turn off JavaScript to see how they index your site.
Server load:
Flash is the best solution while it reuses the Flash movie for any headline and does not perform any server side rendering.
True Font Family can make caches of the images so they are only created once and are stored on the server. Furthermore it tells clients to cache the images so most if not all browsers will only get eache image once.
Traffic load:
The best solution would be if browsers supported web fonts. And both techniques increase the bandwidth used for a page. With increasing connections and bandwidth this is somewhat an issue. But until now these techniques allow you more freedom using fonts on the Internet.
This is probably going to shock you but, Win IE has supported embedded fonts since IE4!!!! I’ve often used this completely undocumented feature simply because IE is such a dominant browser and because its done in CSS you can specify alternatives.
Unfortunately the support only covers EOT (embedded opentype fonts) and you need a special tool to create the files.
Go here for more info….
Yes. Microsoft added EOT and Netscape added TrueDoc. Both actually quite useless because of the ’special tool’. One could consider the above-mentioned True Font Family or Flash to do the job as well.
And betting on IE dominance means losing roughly a quarter of visitors as of Nov 2007 the estimated share of IE is 77.35% and considering the niche of the particular site, the stats may tremendously vary: Browser Market Share for November, 2007
[…] IE, Opera, Safari or webkit […]