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

Re: WOFF and extended metadata

From: Jonathan Kew <jfkthame@googlemail.com>
Date: Wed, 26 May 2010 23:31:30 +0100
Cc: Tal Leming <tal@typesupply.com>, Jonathan Kew <jfkthame@googlemail.com>, Vladimir Levantovsky <Vladimir.Levantovsky@MonotypeImaging.com>, Christopher Slye <cslye@adobe.com>, "www-font@w3.org" <www-font@w3.org>, "public-webfonts-wg@w3.org" <public-webfonts-wg@w3.org>
Message-Id: <5F46019E-CF25-4E77-BF72-9670F6D37C4B@gmail.com>
To: Sylvain Galineau <sylvaing@microsoft.com>
On 26 May 2010, at 23:18, Sylvain Galineau wrote:
> Or we can let each browser vendor figure out whether and how they'll render the unknown arbitrarily deep
> XML they might come across. By now it's painfully clear which approach I believe to be most likely to 
> result in solid, complete, working implementations so I'll stop :)

Is this really so hard? I don't speak XSLT, but with the help of a few examples I found online, I've just thrown together the attached, which gives a reasonable default view (IMHO) of "generic" XML. OK, it wouldn't do anything useful with *truly* generic XML, but it handles the kind of structure used in the WOFF spec and would allow arbitrary extensions along similar lines. It doesn't seem to me that this is significantly different from what you'd have to do in order to present your "property list" in a comparable format, and it's every bit as extensible.

To see what this does, run

   xsltproc woff-metadata.xsl metadata-sample.xml > metadata-sample.html

where metadata-sample.xml is the example from Appendix B, or the metadata block from a real WOFF file; then view the resulting HTML with the browser of your choice.

I didn't tackle the issue of displaying only the user's preferred language, where multiple localizations are present. This is left as an exercise for the reader...... :)

JK





Received on Wednesday, 26 May 2010 22:32:10 UTC

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