-1

i have a imported css font with the following code:

@font-face
{
    font-family: font;
    src: url('myriad pro/myriad pro/MyriadWebPro.ttf'),
    url('myriad pro/myriad pro/MyriadWebPro.ttf');
}

The problem is that online doesn't work but locally works.What is causeing the problem

Antonio Papa
  • 1,596
  • 3
  • 20
  • 38

2 Answers2

0

Try renaming the file path, for example ---> "myriad-pro/myriad-pro/MyriadWebPro.ttf". Is your css file in the folder with the font. Check if your path is right.

P.S: Remove the bottom url (that on the third line.). When I use font-face I use only two. Example: font-family: Consolas; src: url('Consolas.ttf');

divoom12
  • 1
  • 4
  • Try this tool: http://www.fontsquirrel.com/tools/webfont-generator It might help you. Check this out too: http://stackoverflow.com/questions/9897306/font-face-not-working – divoom12 Mar 03 '13 at 00:29
0
@font-face
{
    font-family: MyriadPro; /* just declares a font in your stylesheet */
    src: url('myriad pro/myriad pro/MyriadWebPro.ttf'),
    url('myriad pro/myriad pro/MyriadWebPro.ttf');
}

body 
{
    /* now you need to use it */
    font-family: MyriadPro, sans-serif;
    /* so name it something useful, instead of just "font" */
}

answering old questions

for those who come looking after

tesgo
  • 66
  • 1
  • 7