Live data from Hacker News

No-Bullshit Guide to Detecting Everything in HTML5

diveintohtml5.org

21–30 of 37 posts

Re: No-Bullshit Guide to Detecting Everything in HTML5

#21
post #10

Useful. Sadly, I don't see detection for @font-face -- perhaps because it's not very simple? http://paulirish.com/2009/font-face-feature-detection/

Surprisingly, this query returns almost nothing:

http://www.google.com/search?q=site:diveintohtml5.org+font

Re: No-Bullshit Guide to Detecting Everything in HTML5

#23
post #10

Useful. Sadly, I don't see detection for @font-face -- perhaps because it's not very simple? http://paulirish.com/2009/font-face-feature-detection/

Some browsers don't support OTF fonts (like Android?) I can't seem to find a way to detect that short of getting into subtleties of WebKit revisions, but even that doesn't seem to denote support.

Re: No-Bullshit Guide to Detecting Everything in HTML5

#26
post #10

Useful. Sadly, I don't see detection for @font-face -- perhaps because it's not very simple? http://paulirish.com/2009/font-face-feature-detection/

Modernizr (linked at the bottom of my guide) can detect support for @font-face. It is decidedly non-trivial.

http://github.com/Modernizr/Modernizr

Re: No-Bullshit Guide to Detecting Everything in HTML5

#27
post #11

Wow, it's so intuitive.

Yes, it screams for a wrapper library. Might take all of 10 minutes to design the API.

Modernizr (linked at the end of my guide) can detect some of these features, plus a few others:

http://github.com/Modernizr/Modernizr

My longer chapter on detecting HTML5 features ( http://diveintohtml5.org/detect.html ) explains the detection patterns, and shows how to detect things with or without Modernizr. I've been working with the Modernizr developers to expand their detections, and at the same time some of the code in this guide is taken directly from Modernizr.

Re: No-Bullshit Guide to Detecting Everything in HTML5

#30
post #10

Useful. Sadly, I don't see detection for @font-face -- perhaps because it's not very simple? http://paulirish.com/2009/font-face-feature-detection/

Its because @font-face is CSS2 (http://www.w3.org/TR/1998/REC-CSS2-19980512/fonts.html#font-...) and has nothing to do with HTML5
Post reply on HN