Page 1 of 1

How to add my own font?

Posted: Tue Apr 29, 2008 7:32 pm
by spinne
Hi,

i'am using cmsms 1.2.4 and want to add my own TrueType font in the stylesheet. I have tried the following syntax but it doesn't work.

@font-face {
    src:url("uploads/font.ttf");
    fontFamily: myFont;
}

What is wrong?

Any idea would be appreciated.

Re: How to add my own font?

Posted: Tue Apr 29, 2008 8:23 pm
by Nullig
Try:

@font-face {
    font-family: "myFont";
    src: url(http://yourwebsite.com/uploads/font.ttf) format("truetype");
}

Nullig

Re: How to add my own font?

Posted: Tue Apr 29, 2008 8:25 pm
by RonnyK
spinne,

W3 states......
      @font-face {
        font-family: "Robson Celtic";
        src: url("http://site/fonts/rob-celt")
      }
so check with the "-" in font-family, also a blank after src:

If that doesnt work, you might try the full URL instead of the relative URL.

Ronny

Re: How to add my own font?

Posted: Wed Apr 30, 2008 11:45 am
by spinne
I have tried all your ideas but nothing worked for me. Then I made a simple index.html with the following content:



  Titel
 
  @font-face { font-family:myFont; src:url(webdings.ttf) format(TrueType); }
 

  Test Font



This doesn't work, too. So I don't think this is a problem with cmsms but I don't know what it is.