2 replies [Last post]
k0k1
Offline
newbie
Last seen: 16 years 36 weeks ago
Joined: 2004-03-18
Posts: 1
Points: 0

Hi all,

am trying real hard to embed fonts through CSS. After reading some exanples/tutorials... I came up with this... But still does not work.... HELP! What am I doing wrong? Thanks :?

_____________________

<style TYPE="text/css" MEDIA="screen, print">
@font-face {
font-family: "Viner Hand ITC";
src: url("http://images.hollywood.com/images/site/vineritc.ttf")
};
H4 { font-family: "Viner Hand ITC"; font-size: 22px; font-weight: bold; color: #CC0000; };
.headlines { font-family: "Viner Hand ITC"; font-size: 22px; font-weight: bold; color: #CC0000; };
</style>

<H4>Test</H4>

co2
co2's picture
Offline
Leader
UK
Last seen: 12 years 32 weeks ago
UK
Joined: 2003-09-17
Posts: 721
Points: 0

@font-face

Have you check if your browser is compliant with this CSS Wink

The next sentence is true. The previous sentence is false. Discuss...

co2
co2's picture
Offline
Leader
UK
Last seen: 12 years 32 weeks ago
UK
Joined: 2003-09-17
Posts: 721
Points: 0

@font-face

Further to this...

I think the general consensus is that the @font-face is a fantastic concept, but near impossible to get working. Ideally, it should work how you've coded, there doesn't seem any problem with your code.

But in practice, it does not. IE needs the font in an .eot (embedded open type) format, so a simple TrueType font won't work (apparently IE only uses these fonts for displaying within the browser, not TT). You can get a converter from MS though http://www.microsoft.com/typography/web/embedding/weft/ . However, this puts the idea into question, since, it then becomes a proprietary rule.

The problem could also be down to specifying which unicode range you have to use Shock which gets deeper with a bit of knowledge of font metrics etc.

I read somewhere that W3C are going to drop @font-face in CSS3 (in favour of something to do with SVG). [Edit: this may not be the case after further research... good, I would love this feature.]

I have yet to see a site using it correctly. If anyone can point me to one, I'll all the more happier Wink

The next sentence is true. The previous sentence is false. Discuss...