0

I have the written the following code in CSS for it to load the fonts. The path are double checked, they are fine, but I do not know why it does not load them up. it worked until quite several days ago. Now, it does not work. Here is the written code:

@font-face {
    font-family: Yekan;
    src:    url('font/BYekan.eot?#') format(‘eot’),    
          url('font/BYekan.woff') format('woff'),
          url(‘font/BYekan.ttf’) format(‘truetype’); 
}
1
  • please mark accepted who solved your question. Thanks :) Commented Dec 2, 2013 at 9:05

4 Answers 4

2

Your styles have ‘’ in them when they should be '. Change them and it should work.

@font-face {
    font-family: Yekan;
    src:  url('font/BYekan.eot?#') format('eot'),    
          url('font/BYekan.woff') format('woff'),
          url('font/BYekan.ttf') format('truetype'); 
}
Sign up to request clarification or add additional context in comments.

1 Comment

thanks this has worked and so strange. I'm not a newbie to CSS3 but I'm so busy that have missed such dump point
1

You have not written url and format in quotes.

src:url('font/BYekan.eot'); statement will use font file installed on user's computer if available and not load font file. This is important, otherwise every time font file will be loaded to user's browser even if it is available.

Try:

@font-face{
    font-family:'Yekan';
    src:url('font/BYekan.eot');
    src:local('Yekan'),url('font/BYekan.eot?#iefix') format('embedded-opentype'),url('font/BYekan.woff') format('woff'),url('font/BYekan.ttf') format('truetype');
    font-weight:normal;
    font-style:normal;
}

1 Comment

Can you also explain what changes you have made for the OP to know before he makes the copy/paste?
1

Your truetype font path wrapper should be replaced with '(single quot) not with `

@font-face {
    font-family: 'Yekan';
    src:    url('font/BYekan.eot?#') format(‘eot’),    
          url('font/BYekan.woff') format('woff'),
          url('font/BYekan.ttf') format(‘truetype’); 
}

2 Comments

Yes, the problem might be in '***', but you wrote: "it worked until quite several days ago". Did you change something after these days?
@MiheyEgoroff They could have copied it from another text editor which automatically uses ?
1

Use in your style.css :

@font-face {
    font-family:'Yekan';
    src:  url('font/BYekan.eot?#') format('eot'),    
          url('font/BYekan.woff') format('woff'),
          url('font/BYekan.ttf') format('truetype'); 
}

Then use in your class :

font-family: 'Yekan', sans, helvetica;

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.