W3C home > Mailing lists > Public > www-style@w3.org > May 2009

Re: CSS3 Web Fonts issue with ?block on downl oad?

From: David Hyatt <hyatt@apple.com>
Date: Thu, 07 May 2009 12:52:48 -0500
Cc: www-style@w3.org
Message-id: <2CE9481D-8484-4354-9FF2-6259A87556DB@apple.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
On May 7, 2009, at 12:34 PM, Boris Zbarsky wrote:

> On May 7, 2009, at 9:08 AM, David Hyatt wrote:
>
>> You don't want to see an unsightly visual flicker every time you  
>> use an uncached downloadable font.  I think the behavior of just  
>> showing  nothing until the font is loaded is much better.  WebKit  
>> should  probably eventually display the wrong font after a certain  
>> timeout  period, but displaying the wrong font immediately is as  
>> bad as FOUC.
>
> I thought that Webkit's current behavior was to not paint the text  
> but to still
> lay it out with some sort of default metrics while painting other  
> things on the
> page...  If so, doesn't that still cause flicker when you switch to  
> using the
> right metrics, because non-text parts of the page, or text parts  
> that are not
> using the downloadable font, end up moving around when the font loads?
>

We skip over loading fonts when doing measurement, so we just move on  
to the next fonts in the list.  This allows a developer to specify a  
very similar fallback font, and so ideally those metrics will end up  
being pretty close to your target font.

I have yet to see any site that uses @font-face that has caused a  
visual jump of elements in WebKit when the font finally loads.  Then  
again sites that even use the feature are obviously rare.

In practice, you don't see any layout jumping, since the pages that  
use downloadable fonts have tended to be well designed.  This is  
somewhat like web sites putting explicit sizes on images to avoid  
jumping when the images load.  If you design your site right, you'll  
be pretty robust against font geometry changes.

dave
(hyatt@apple.com)
Received on Thursday, 7 May 2009 17:53:29 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:18 GMT