W3C home > Mailing lists > Public > www-style@w3.org > October 2010

Re: @font-face and slow downloading

From: John Daggett <jdaggett@mozilla.com>
Date: Tue, 12 Oct 2010 07:41:35 -0700 (PDT)
To: Yuzo Fujishima <yuzo@google.com>
Cc: www-style@w3.org, Beth Dakin <bdakin@apple.com>
Message-ID: <167299080.50839.1286894495102.JavaMail.root@cm-mail03.mozilla.org>
Hi Yuzo,

>  15  Example:
>  16  <style>
>  17  @font-face {
>  18      font-family: samplefont;
>  19      src: url([URL]), local([LocalFont]);
>  20  }
>  21  </style>
>  22  <span style="font-family: samplefont, [OtherFont]">Hello</span>
>  23 
>  24  If [LocalFont] is a valid local font, it is used as the fallback.
>  25  Otherwise, [OtherFont] is used.

I don't think this is such a good idea, it confuses load fallback with
character fallback. The src list describes load fallback, the order in
which font loading is attempted until a load succeeds. The font-family
list defines character fallback order, the order in which fonts are
searched for a given character.

Your example could just as easily be written as:

  <span style="font-family: samplefont, [LocalFont], [OtherFont]">Hello</span>

The intent of local() is to allow the downloading of a given font to be
skipped if a local equivalent is available.  That's not possible with
just a font family list because of the way character fallback happens.

> (BTW http://dev.w3.org/csswg/css3-fonts/ is the latest draft.)

Thanks for mentioning that!


Received on Tuesday, 12 October 2010 14:42:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:39 UTC