W3C home > Mailing lists > Public > www-font@w3.org > April to June 2010

Re: WOFF and extended metadata

From: John Daggett <jdaggett@mozilla.com>
Date: Thu, 20 May 2010 01:19:02 -0700 (PDT)
To: Christopher Slye <cslye@adobe.com>
Cc: www-font@w3.org, public-webfonts-wg@w3.org
Message-ID: <503806922.227966.1274343542643.JavaMail.root@cm-mail03.mozilla.org>
Christopher Slye wrote:

> These points are understood and not disputed:
> - The WOFF extended metadata block is optional.
> - A user agent is not required to do anything with metadata if/when
>   it's present.

Good.  Requiring metadata doesn't make much sense to me, it's really up
to the person packaging a font whether metadata is necessary or not. And
as Sergey pointed out there may be user agents that would never access
the metadata information, analogous to user agents that lack "View
Source" functionality.

> The question today was: If a font is received by a UA that has invalid
> XML metadata, should the UA ignore the metadata block, or reject the
> font?

With the current spec, user agents do not unpack the metadata when
loading a font.  If the user agent has some form of UI for displaying
font metadata, then the user agent unpacks the metadata when a user
requests it.  If you make font loading conditional on the validity of
the metadata XML that means user agents must *always* verify this,
whether or not a particular user agent will ever use this data or not.  

> Let's say that some future UA has an option which shows all metadata
> to the user. It receives a WOFF file with invalid metadata and ignores
> it. The user inspects the WOFF data via the UA and finds nothing
> there. They might get the impression that the font is not being used
> legally.

This is really a question of error handling.  For example, if a
stylesheet contains an invalid CSS property then the user agent ignores
that property setting, as per the CSS spec.  Different user agents often
also offer some form of error console, which displays the error details.
The exact form the error takes is *not* described in a spec.

I think it would be logical to do something similar for the font
metadata.  If it's invalid it would be ignored but a user agent could
display the specifics of why the XML is not well-formed.  I think most
authors seeing a message like this would just think it was a bug and not
assume anything about whether the font usage was legal or not.

> I think there was agreement that we'd add a requirement that any WOFF
> generation tool must produce valid XML for the metadata block.

I suggested this during the call but the more I think about it the more
I think it's not such a good idea, it burdens simple WOFF generation
tools with the validating XML.  In many cases a better process would
involve a separate tool that handled the XML validation, in which case
requiring XML validation as part of the WOFF tool would be unnecessary.


John Daggett
Received on Thursday, 20 May 2010 08:19:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:34 UTC