W3C home > Mailing lists > Public > www-style@w3.org > June 2008

Webfonts 'src' syntax

From: Erik Dahlström <ed@opera.com>
Date: Tue, 17 Jun 2008 17:06:40 +0200
To: "www-style@w3.org" <www-style@w3.org>
Cc: "John Daggett" <jdaggett@mozilla.com>, "public-svg-wg@w3.org" <public-svg-wg@w3.org>
Message-ID: <op.ucwexeqcgqiacl@gnorps>

Hello css wg,

A question about the correctness of the following piece of CSS, which can  
be seen in context here[1].

    <style type="text/css">
       <![CDATA[
         @font-face {
           font-family: 'Super Sans';
           font-weight: normal;
           font-style: italic;
           src: url("myfont.svg#Font2") format(svg)
         }
       ]]>
    </style>

The 'src' syntax[2] in CSS 2.0 (and in all CSS 3.0 drafts I've seen so  
far) says that 'format' must contain a <string>, which means "svg" needs  
to be quoted. Is that the intention? It seems that Safari 3.1.1 accepts  
unquoted strings in format.

There's also a 1.1 testcase, fonts-elem-04-b.svg[3], that has the same  
"bug" in it.

Cheers
/Erik

[1] http://www.w3.org/TR/SVG11/fonts.html#SVGFontsOverview
[2] http://www.w3.org/TR/REC-CSS2/fonts.html#referencing
[3] http://www.w3.org/Graphics/SVG/Test/20061213/svggen/fonts-elem-04-b.svg

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Tuesday, 17 June 2008 15:24:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:07 GMT