わかりましたので、IE9にフォントAgendaを表示させようとしています。いつものように fontsquirrel に行ったところ、フォントビューローがフォントキットの作成を許可していないと書かれています。その後、私は codeandmore に行き、そこでキットを作成しましたが、フォントのライト バージョンを作成するための専門的なオプションはありません。IE 9 では、エラー CSS3111 および CSS3114 が発生します。
CSS3111: @font-face encountered unknown error.
agenda-light.eot?#iefix
CSS3114: @font-face failed OpenType embedding permission check. Permission must be Installable.
agenda-light.ttf
フォント フェイスのターゲットを woff にするなど、複数の回避策を試しましたが、うまくいきませんでした。
@font-face {
font-family: 'IE9Agenda-Light';
src: url('agenda-light.woff') format('woff');
font-weight: normal;
font-style: normal;
}
次の構文で .htaccess ファイルを追加しました。
AddType font/ttf .ttf
AddType font/eot .eot
AddType font/otf .otf
AddType font/woff .woff
ここにある種の構成ファイルを配置する必要があると思いますが、何を使用すればよいかわかりません。クライアントもフォントを購入したので、違法なフォントはありません。これが私のコードです:
@font-face {
font-family: 'Agenda-Bold';
src: url('agenda-bold.eot?') format('embedded-opentype'),
url('agenda-bold.woff') format('woff'),
url('agenda-bold.ttf') format('truetype'),
url('agenda-bold.svg#agenda-bold') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Agenda-Light';
src: url('agenda-light.eot');
src: url('agenda-light.eot?#iefix') format('embedded-opentype'),
url('agenda-light.woff') format('woff'),
url('agenda-light.ttf') format('truetype'),
url('agenda-light.svg#agenda-light') format('svg');
font-weight: normal;
font-style: normal;
}
これは、IE9 を除くすべてのブラウザーで機能します。誰かが、eot.compressed バージョンの代わりに lite バージョンとして eot ファイルをパックする font squirrel に代わるフォント フェイス ジェネレーターを持っている場合、それが唯一の回避策と思われるものに役立ちます。私はまだ見つけていません。