On 2/10/14 17:17, Ehsan Akhgari wrote:

Is support for WOFF2 feature detectible?

Not directly, but it would be fairly easy for a site that really wants to detect it via CSS+JS hackery to do so. There'd be some overhead to such detection, though.

Or do people need to hardcode
UA versions to know what UAs support it?

I believe that's what Google Fonts currently does, though IMO a better approach is to serve CSS that offers both WOFF2 and older (more widely-supported) formats, using the @font-face src descriptor's "format hint" to let the browser choose the optimal resource depending on what it supports:

  @font-face {
    font-family: MyFont;
    src: url(myfont.woff2) format("woff2"),
         url(myfont.woff) format("woff"),
         url(myfont.eot) format("embedded-opentype"),
         url(myfont.ttf) format("truetype");
  }

etc.

JK

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to