Subject: [websec] Font sniffing

From: "Anne van Kesteren" <[email-masked]>
Date: Tue, 25 Jan 2011 13:16:20 +0100

Due to nobody taking specifying media types, Content-Type for fonts is a  
lost cause. They probably need a loading context similar to images which  
the @font-face specification should use at some point.

Here are the signatures that Opera handles:

   0x74746366 'ttcf' (TTC; TrueType Collection)
   0x4F54544F 'OTTO' (OTF; OpenType)
   0x00010000        (TTF; TrueType)
   0x774F4646 'wOFF' (WOFF; Web Open Font Format)

For WOFF application/font-woff is being registered it seems, but nobody  
enforces that to my knowledge. I.e. user agents sniff.

In case it was unclear this is feedback on  
http://tools.ietf.org/html/draft-ietf-websec-mime-sniff :-)

-- 
Anne van Kesteren
http://annevankesteren.nl/

---

From: Tobias Gondrom <[email-masked]>
Date: Tue, 25 Jan 2011 19:27:21 +0000

Anne,
Sorry, I don't understand what you mean with your comment.
AFAIK font sniffing was not the intent for the
draft-ietf-websec-mime-sniff draft.
Do you suggest to do s.th. in websec in this regard (font types) and
why/what?
- Tobias

On 01/25/2011 12:16 PM, Anne van Kesteren wrote:
> Due to nobody taking specifying media types, Content-Type for fonts is
> a lost cause. They probably need a loading context similar to images
> which the @font-face specification should use at some point.
>
> For WOFF application/font-woff is being registered it seems, but
> nobody enforces that to my knowledge. I.e. user agents sniff.
>
>

---

From: "Anne van Kesteren" <[email-masked]>
Date: Tue, 25 Jan 2011 21:05:53 +0100

> Do you suggest to do s.th. in websec in this regard (font types) and

I am not sure what "s.th." means, but similar to sniffing rules for e.g.  
images (currently in the document) user agents have sniffing rules for  
fonts (currently not in the document). I think they should both be in the  
document. And similar to how HTML's definition of <img> references these  
rules, CSS definition of @font-face probably ought to reference them too.