1

I'm trying to add a different font to my website and I'm having some issues. I have checked a few stackoverflow questions, but none of them seems to fix my problem:/ I'm using this code here:

@font-face {
    font-family: "Hand";
    src: url(ownhand.ttf) format("truetype");
    }

And it works perfectly in local, but for some reason when I upload the file to my domain it turns out to appear as times new roman again. Any ideas on why is that happening? Could it be a protection problem??

Thank you very much!

user3261537
  • 33
  • 1
  • 4
  • Have you tried navigating to `ownhand.ttf` in a web browser hosted on the server to see if the web server is serving the file correctly? – Steven V Feb 03 '14 at 22:02
  • what browsers, operating system are you testing in? It could be a user permission problem, it could also be a file permission problem. It could be because you're not using the right file format for the browser you're looking at. – ntgCleaner Feb 03 '14 at 22:03
  • Look at your chrome developer tools and look at the request for your ownhand.ttf file. Any errors there? – Ruan Mendes Feb 03 '14 at 22:03
  • I'm so sorry but I'm really new at programming, so I get quite lost with all the computers terminology. @ntgCleaner I am using google chrome alwas (same in localhost). – user3261537 Feb 03 '14 at 22:11
  • @JuanMendes Where do you say that I have to go?? Do I have to download Chrome DevTools (I have just googled it) – user3261537 Feb 03 '14 at 22:14
  • right click on your browser and select "inspect Element" – user3123529 Feb 03 '14 at 22:26
  • Using Chrome, press `F12`, or `ctrl+shift+i`, the dev tools app will come up – Ruan Mendes Feb 03 '14 at 22:29

1 Answers1

0

Here what i am using and it works for me. you would need serprate file for each broswer . I dont have font for IE in following code. THis works for chrome and firefox.

@font-face {
        font-family: "OpenSans Light";
        src: url('/csspath/OpenSans-Light-webfont.ttf') format('truetype'), 
             url('/csspath/OpenSans-Light-webfont.eot') format('eot');
}
user3123529
  • 112
  • 5