问题
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 .
回答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/
来源:https://stackoverflow.com/questions/17234768/font-face-not-working-for-my-ttf-font-in-all-browsers