RE: [css3-fonts] multiple formats in src descriptor

On Thursday, May 26, 2011 2:27 AM John Daggett wrote:
> 
> Daniel Glazman wrote:
> 
> > Sorry, but in the case of the src font descriptor [1], I don't
> > understand exactly the use case for a format() hint containing more
> > than one format string. For instance:
> >
> >    src: url(foo) format("woff", "opentype");
> >
> > Is it to handle the case where a single URL can reference multiple
> > font objects of different formats? In that case, what's the mechanism
> > used for the format selection between user agent and server? Content
> > negociation based on the format string?
> 
> There are font formats that overlap (e.g. various subflavors of
> TrueType) but user agents will typically support both format hints, so
> I'm not sure there's a real need for this.  The format hint is there
> to tell a user agent when *not* to download a font, not to identify
> the data format in any great detail.
> 

Actually, format hints containing more than one format string may come handy with WOFF, where one string would identify WOFF as a container format, and another one (as in Daniel's example above) could be used to identify the format of a font encapsulated inside WOFF file. For this to be useful, the format hints should be well defined and specific  -e.g.:

src: url(foo) format("woff", "opentype-cff");

would allow UA to skip downloading a WOFF resource containing OpenType CFF font if it is known that the device cannot render CFF outlines.

Regards,
Vladimir

> [1] http://www.w3.org/TR/1998/REC-CSS2-19980512/fonts.html#referencing

Received on Thursday, 26 May 2011 14:04:56 UTC