HighDots Forums  

Re: IE has a parsing error in CSS @font-face src (CSS2 syntax)

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: IE has a parsing error in CSS @font-face src (CSS2 syntax) in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Vassilii Khachaturov
 
Posts: n/a

Default Re: IE has a parsing error in CSS @font-face src (CSS2 syntax) - 07-07-2004 , 01:37 AM






Does anybody know if there exists a clean workaround that would enable
MSIE to fetch and use my TTF font?

Quote:
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).

Reply With Quote
  #2  
Old   
Claire Tucker
 
Posts: n/a

Default Re: IE has a parsing error in CSS @font-face src (CSS2 syntax) - 07-08-2004 , 12:45 PM






On 6 Jul 2004 23:37:30 -0700, vassilii (AT) tarunz (DOT) org (Vassilii
Khachaturov) wrote:
Quote:
Does anybody know if there exists a clean workaround that would enable
MSIE to fetch and use my TTF font?

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.

Good luck,
-Claire


Reply With Quote
  #3  
Old   
Vassilii Khachaturov
 
Posts: n/a

Default Re: IE has a parsing error in CSS @font-face src (CSS2 syntax) - 07-10-2004 , 03:27 AM



Quote:
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.
That hurts, I won't have access to a Windows machine for next couple
of weeks.
(I'll be happy if someone around the newsgroup here has this WEFT tool
and
can wrap the TTF from my page for me to try).

But my page already tries to provide a Windows-specific solution by
sending
the Windows IE a code with an activex reference that displays the PFR
alternative.

Quote:
You may wish to then include other file formats such that browsers
will pick the one most suitable, assuming they support downloadable
fonts.
Actually, if you look at my original post (or, for that matter, at the
CSS
linked in at http://www.tarunz.org/~vassilii/Hobbit/ ), you'll see I
am
already trying to do it - right now I'm giving both the TTF and the
PFR alternatives. It seems that it is exactly my giving the multiple
alternatives that triggers the IE parsing error as documented in my
OP. I wonder if the same thing won't happen if I use this
WEFT-produced alternative along with the TTF and the PFR?

V.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.