Jump to content

Recommended Posts

I have the following custom font:

 

@font-face {
font-family: ws;
font-style:  normal;
src: url(/media/fonts/ws.eot);
src: local("WebServeroff"), url(/media/fonts/ws.otf) format("opentype");
font-weight: normal;
font-style: normal;
}

 

But it doesn't work in IE any reason why?

Link to comment
https://forums.phpfreaks.com/topic/253869-custom-font/
Share on other sites

But it doesn't work in IE any reason why?

The code is not correct, not by a mile, to be cross-browser. See here how it should be done: Font Face Generator. Just upload the (legal) font and you will get both the converted font files and the correct css code. Much faster than Cufon, too.

Link to comment
https://forums.phpfreaks.com/topic/253869-custom-font/#findComment-1302884
Share on other sites

Here use this code

 

@font-face {
font-family: 'font';
src: url('media/fonts/font-webfont.eot?') ,  url('media/fonts/font-webfont.ttf') ,  url('media/fonts/font-webfont.woff') ,  url('media/fonts/font-webfont.svg');
}

 

Explanation:

 

your custom font needs to be declared -->font-family: 'font';

now if you want that font to be applied to a box this is what you do:

 

#box {

          width; 0px;

          height: 0px;

          font-family:'font';

}

 

now the box will use your custom font.

 

enjoy.

Link to comment
https://forums.phpfreaks.com/topic/253869-custom-font/#findComment-1303268
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.