This question already has an answer here:
- @font-face fonts not working 2 answers
I need to set a font family in my web page with thte @font-face, but I can't make it work propertly: This is the content of my css file
@font-face {
font-family: knockout;
src: url('../fonts/knockoutHTF27.ttf');
}
body {
font-width: normal;
font-size: 20px;
font-family: knockout !important;
color: #223041;
text-align: center;
}
I've tried the same code in two diferent computers and it works pefercty in one of them but doesn't work in the other. What could be wrong?
You should try with full embedding, with all the quotation marks. It clears possible malfunctions on different browsers/OS.
Then, use it like this:
As mentioned in a previous answer, if needed, you can use http://www.fontsquirrel.com/ or one of other font-face generator services on the web, to get all needed font formats.
You must use other font file format for different browesers not only
.ttf
,.woff, .eot
. And check your pathTry after removing ''