0

I used ttf font for my website using @font-face in css like this

@font-face
{

font-family: myFirstFont;

src: url('tamil.ttf');


} 

.tlan {
font-family: myFirstFont;
color:#039;
}

tamil.ttf is not english language font. I can't able to solve this problem ..

follow this link, for all my stuffs regarding this @font-face problem. http://aaritcare.com/font%20problem/

i am attached word document with my font .

hserusv
  • 976
  • 1
  • 7
  • 17
  • @NathanLee yeah , i did UTF declaration also. but i cant solve this problem. please visit above link for all my regarding this problem – hserusv Jun 21 '13 at 12:15
  • 1
    You're only serving up a `.ttf` font, some browsers require other formats, like `.eot` for example. I would run your `.ttf` font through http://www.fontsquirrel.com/tools/webfont-generator and download the generated `CSS` – Nick R Jun 21 '13 at 12:23
  • @NickR Thank you its working fine. but some character is missing . for demo [http://aaritcare.com/tamil/tamil-demo.html] – hserusv Jun 21 '13 at 13:04

1 Answers1

1
try this :

    @font-face required eot, woff, svg, font format.

    @font-face {
     font-family: "tamil";
     src: url("tamil.eot") format('embedded-opentype'), /* EDIT correction on this line */
     url('tamil.woff') format('woff'),
     url('tamil.ttf') format('truetype'),
     url('tamilvg#') format('svg');
     font-weight:bold;
     font-style:normal;
    }

or 

<FilesMatch "\.(ttf|otf|eot)$">
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
    </IfModule>
</FilesMatch>`

and i am sure if you want to make @fontface kit on this sites http://www.fontsquirrel.com/

Falguni Panchal
  • 8,873
  • 3
  • 27
  • 33