0

I am using YanoneKaffeesatz Font in my wordpress website. So to use this font first I generated code from FontSquirrel. Then I got this piece of code

@font-face {
font-family: 'yanone_kaffeesatz_lightRg';
src: url('yanonekaffeesatz-light-webfont.eot');
src: url('yanonekaffeesatz-light-webfont.eot?#iefix') format('embedded-opentype'),
     url('yanonekaffeesatz-light-webfont.woff') format('woff'),
     url('yanonekaffeesatz-light-webfont.ttf') format('truetype'),
     url('yanonekaffeesatz-light-webfont.svg#yanone_kaffeesatz_lightRg') format('svg');
font-weight: normal;
font-style: normal;
}

Then I paste the code in my css file and paste all the converted fonts(.otf,.svg, .ttf) in my website folder but still my font has not been changed. So can some one tell me why this is happening? Any help and suggestions will be highly appreciable.

amit patel
  • 63
  • 6
  • 14
  • You really need to show your directory structure for problems like this. It's impossible to see if you have the correct paths in use for the fonts. – daveyfaherty Oct 10 '12 at 16:41

1 Answers1

1

Are the font files in the same dir as your stylesheet? You're currently pointing to that dir. Paths in CSS are relative to the stylesheet, not the root.

root 
  -css/styles.css
  -images/
  -fonts/
  index.html

With the above structure you would use this as your URL.

url('../fonts/your_font.font;);
SpaceBeers
  • 13,617
  • 6
  • 47
  • 61