In IE7 and IE8, when using a custom web font, text is sometimes italicized, even when I explicitly set font-style: normal
. The problem is sporadic - it will be processed several times, then I update, and everything is in italics, then I update and return to normal.
I use this @font-face
declaration:
@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; }
Theres a comment on in this article that indicates that it might be roughly the order of the @font-face
declarations: however, the only thing that stopped the problem was that italics were removed altogether.
Another answer suggests using the Font Squirrel @ font-face font generator; I cannot do this, but the font files on the Internet that I use have DRM.
Is there a way to solve this problem without completely removing italic ads?
UPDATE:. Upon further investigation, it seems that this problem also affects IE8, and not just in compatibility mode.
source share