Jump to content

Custom Font


The Little Guy

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.