How to add my own font?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
spinne

How to add my own font?

Post 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.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: How to add my own font?

Post by Nullig »

Try:

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

Nullig
Last edited by Nullig on Tue Apr 29, 2008 8:29 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: How to add my own font?

Post 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
spinne

Re: How to add my own font?

Post 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.
Locked

Return to “Layout and Design (CSS & HTML)”