![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Internet Explorer at least 5.01 and on at least NT4.0 and on has the following problem: when loading the page http://www.tarunz.org/~vassilii/Hobbit/ with the associated CSS http://www.tarunz.org/~vassilii/Hobbit/Hobbit.css , it has an obvious problem parsing the CSS @font-face src: attribute, because this is what is the URL it tries to fetch after loading the HTML and the CSS, according to the server log: /~vassilii/Hobbit/zxspec.ttf\")%20format(\"truetype\"),%20url(\"ZX-Spectrum.pfr\")%20format(\"truedoc-pfr Here's an excerpt of the CSS sheet (its beginning) for your convenience that causes the problem: @font-face { font-family: "ZX-Spectrum"; font-style: normal; font-weight: lighter; src: url("zxspec.ttf") format("truetype"), url("ZX-Spectrum.pfr") format("truedoc-pfr"); } As a result, it is never able to fetch the TTF. I even hacked my server to respond with a 302 to the broken URL with a clean redirect to the actual TTF; this causes IE to request the TTF file but it never does anything with it later on (i.e. doesn't render the page using it). |
#2
| |||
| |||
|
|
Does anybody know if there exists a clean workaround that would enable MSIE to fetch and use my TTF font? |
#3
| |||
| |||
|
|
Internet Explorer won't use a TTF file from a stylesheet, but Microsoft has a special font format which wraps glyphs from a TrueType font, optionally such that only certain glyphs are included to make the resulting file smaller. To make these special font files you need WEFT, Microsoft's converter tool. Some searching on Google or microsoft.com should help you find it. WEFT will also generate some example CSS showing you how to use it. |
|
You may wish to then include other file formats such that browsers will pick the one most suitable, assuming they support downloadable fonts. |
![]() |
| Thread Tools | |
| Display Modes | |
| |