Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedded Font problems 1

Status
Not open for further replies.

NTSGuru

Programmer
Jul 25, 2000
52
Someone please tell me i'm not an idiot.

I cannot seem to get a font to embed into a web page. Here's my code :


<html>
<head>
<STYLE TYPE=&quot;text/css&quot;>
<!--
@font-face {
font-family: Papyrus;
font-style: normal;
font-weight: normal;
src: url( }

.f1 { font-family: Papyrus; }

</style>

</head>

<body>

<span class=f1>This should be Papyrus Font</span>

</body>
</html>


I created the eot with MS WEFT (latest version). I don't understand why this isn't working, and it's causing me much frustration. Any help anyone can provide would be greatly appreciated.

TIA,
Fred
 
As far as I know, font embedding is not supported in any browser in a way that allows you to use it as simple as other CSS features. Don't bother yourself with it, using regular font families is sufficient in 100% of all cases.
 
Hi,

You're NOT an idiot! I just tested it and it worked fine for me!! it took about 4 seconds for the font to download but it worked fine!!

Try with just src: url(/fonts/PAPYRUS0.eot);
and see if it makes any difference.

I don't know what your problem is but I just copied your code and it was fine!

What browser are you using?


É

- :: my FIRST site in XHTML, comments/ criticism/ questions much appreciated!! :)
-
 
It worked fine for me after I added --> before the </style>

Wayne Franklin
SmartPath, Inc.
 
Thanks all for the help! I'm still stuck with it though.

Starway : the reason i'm trying to do this is for 2 reasons.
1) because i want to learn how to do it
2) the page i'm working on requires some odd fonts for aesthetic reasons, and I can't make them into jpgs or gifs

cian : did you copy it to your local machine and use it? If i have a local copy of that code, then it works, but as soon as i upload it to the webserver, it doesn't work anymore. try I'm using IE5.5 and Netscape7. I included the source code at the bottom of this post. Also, changing the URL like you suggested didn't seem to make any difference.

waf1 : thanks for catching that.


I double checked, and I don't have it installed on my local machine, so that's not why it works on one and not the other. Is it possible to create the EOT wrong?

Thanks again!
Fred

<html>
<head>
<STYLE TYPE=&quot;text/css&quot;>
<!--
@font-face {
font-family: Papyrus;
font-style: normal;
font-weight: normal;
src: url( }

@font-face {
font-family: Arial;
font-style: normal;
font-weight: normal;
src: url( }
@font-face {
font-family: Arial Black;
font-style: normal;
font-weight: normal;
src: url( }

@font-face {
font-family: Modern No. 20;
font-style: normal;
font-weight: normal;
src: url( }

.f1 { font-family: Papyrus; }
.f2 { font-family: Arial; }
.f3 { font-family: Arial Black; }
.f4 { font-family: Modern No. 20; }

-->
</style>

</head>

<body>

<span class=f1>This should be Papyrus Font</span><BR><BR>
<span class=f2>This should be Arial Font</span><BR><BR>
<span class=f3>This should be Arial Black Font</span><BR><BR>
<span class=f4>This should be Modern No. 20 Font</span>

</body>
</html>
 
Hi there,

I am havign a somewhat similar problem where I want to display multibyte characters on the site. It works fine on the Netscape 6 but I can't seem to make it work on Netscape 4.x.

I have to manually change the Font and encoding settings in the preferences (under Edit) window of the browser.

how will the visitors be able to see the content properly without having to manually change the settings. Am I missing something here ?

BTW, I am trying to display Traditional Chinese characters.

thanks for your help
 
You need to specify the Unicode encoding for the page charset:

<meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=UTF-8&quot;>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top