IE7 および IE8 で、カスタム Web フォントを使用すると、明示的に を設定した場合でも、テキストが斜体で表示されることがありますfont-style: normal
。この問題は散発的です。数回は正常にレンダリングされ、更新するとすべてがイタリック体になり、更新すると正常に戻ります。
私はこの@font-face
宣言を使用しています:
@font-face {
font-family: 'DIN';
src: url('fonts/DINWeb.eot');
src: url('fonts/DINWeb.eot?#iefix') format('embedded-opentype'),
url('fonts/DINWeb.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'DIN';
src: url('fonts/DINWeb-Bold.eot');
src: url('fonts/DINWeb-Bold.eot?#iefix') format('embedded-opentype'),
url('fonts/DINWeb-Bold.woff') format('woff');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'DIN';
src: url('fonts/DINWeb-Ita.eot');
src: url('fonts/DINWeb-Ita.eot?#iefix') format('embedded-opentype'),
url('fonts/DINWeb-Ita.woff') format('woff');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'DIN';
src: url('fonts/DINWeb-BoldIta.eot');
src: url('fonts/DINWeb-BoldIta.eot?#iefix') format('embedded-opentype'),
url('fonts/DINWeb-BoldIta.woff') format('woff');
font-weight: bold;
font-style: italic;
}
この記事には、宣言の順序に関するものである可能性があることを示すコメントがあります。ただし、問題を止めた唯一のことは、斜体の宣言を完全に削除することでした。@font-face
別のスタック オーバーフローの回答では、Font Squirrel @font-face ジェネレーターの使用が提案されています。ただし、使用している Web フォント ファイルには DRM があるため、これを行うことはできません。
イタリック体の宣言を完全に削除せずにこれを解決する方法はありますか?
更新:さらに調査したところ、この問題は互換モードだけでなく、IE8 にも影響しているようです。