Your CSS rule at-rule
, a @font-face
, it has incorrect declarations, which is why it is not interpreted by some browsers .
Correct formatting
@font-face {
font-family: 'Calibri';
src:
local('Calibri'),
url('wp-includes/fonts/calibri.ttf');
src:
url('wp-includes/fonts/calibri.eot'),
url('wp-includes/fonts/calibri.eot?#iefix') format('embedded-opentype'),
url('wp-includes/fonts/calibri.woff') format('woff'),
url('wp-includes/fonts/calibri.ttf') format('truetype');
}
Explanation
Specify the search by "local source" before any other address:
src:
local('Calibri'), /* local */
url('wp-includes/fonts/calibri.ttf'); /* remoto */
Note that this statement should end with ;
and not ,
.
Specify the sources for the other files in the most likely order of use and in a separate statement:
src:
url('wp-includes/fonts/calibri.eot'),
url('wp-includes/fonts/calibri.eot?#iefix') format('embedded-opentype'),
url('wp-includes/fonts/calibri.woff') format('woff'),
url('wp-includes/fonts/calibri.ttf') format('truetype');
When programming on Windows servers or Linux servers, the slope of the bar in web addresses is always /
:
"http://www.example.com/fonts/minhaFonte.eot"
Not absolutely necessary for your particular case, but source family names must be enclosed by '
or "
for correct interpretation by browsers:
The names of source families other than generics must be as a string , that is, within '
or "
. Alternatively if not within quotes or sentences, they should be as a sequence of one or more identifiers.
In your case this turns out to be irrelevant because it is a single word Calibri
, but the note remains for future readers.
Related
For these cases, we can use the web-font generator on the web-site FontSquirrel which tries to generate the files suitable for each browser, as well as the style sheet with everything ready to use in our web-site.