Webフォントの指定方法

Webフォントを適用する場合のフォント・ファイル・フォーマットの指定順と方法

Webフォントの指定例として

@font-face {
font-family : 'myWebFont';
src : url(./myfont.eot?) format('embedded-opentype'),
      url(./myfont.woff) format('woff'),
      url(./myfont.ttf) format('truetype'),
      url(./myfont.svg) format('svg');
}

といったCSSをIE8以下も含めた対策として挙げているところが多いけど、これだとwoffに対応しているIE9やIE10もeotを適用するよね

素直に

@font-face {
font-family : 'myWebFont';
src : url(./myfont.eot);
src : url(./myfont.woff) format('woff'),
      url(./myfont.ttf) format('truetype'),
      url(./myfont.svg) format('svg');
}

でいいんじゃね?

どのみちIEなんてeotでいいんだよってんなら別だけどw

うちの場合、実際には、<!--[if lte ie 8]>のMS独自実装を使って、@font-faceをeotで再定義してる。

"Webフォントの指定方法"へのTwitter上でのコメントやRT

2件のツイートがあります。

ツイート 1

ツイート 2