Ich habe online viele Fragen zu Firefox gefunden, die keine lokalen Webfonts (auf dem Server) zeigen, aber keine der Lösungen hat mir geholfen. Öffnen Sie https://nl.hacktisch.com/ in Firefox, um zu sehen, dass die Schriftarten (Karla und Symbolschriftart in Freigabe-Schaltfläche, oben rechts) nicht geladen werden.Firefox: lokal gehosteter Webfont wird nicht angezeigt - auch mit Access-Control-Allow-Origin "*"
Die meisten Antworten sind über die strengen Ursprungs Einschränkungen in Firefox, sondern auch mit den folgenden Einstellungen in .htaccess funktioniert es nicht:
AddType font/ttf .ttf
AddType font/eot .eot
AddType font/otf .otf
AddType font/woff .woff
<FilesMatch "\.(ttf|otf|eot|woff)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
oder sogar
Header set Access-Control-Allow-Origin "*"
können Sie sehen in der firefox Inspektor, dass der Browser nicht einmal versuchen, die Schriftart zu laden:
Dies deutet darauf hin, dass die CSS-Font-Deklaration falsch ist, aber ich habe auch verschiedene Möglichkeiten der Definition der Schriftart in CSS versucht. Zur Zeit wie folgt:
@font-face {
font-family: Karla;
font-weight: 400;
font-style: normal;
src: url('/fonts/k.eot');
src: url('/fonts/k.eot?#iefix') format('embedded-opentype'), local('Karla'), local('k'), url('/fonts/k.woff2') format('woff2'), url('/fonts/k.woff') format('woff'), url('/fonts/k.ttf') format('truetype'), url('/fonts/k.svg#Karla') format('svg')
}
@font-face {
font-family: Karla;
font-weight: 700;
font-style: normal;
src: url('/fonts/k7.eot');
src: url('/fonts/k7.eot?#iefix') format('embedded-opentype'), local('Karla Bold'), local('k7'), url('/fonts/k7.woff2') format('woff2'), url('/fonts/k7.woff') format('woff'), url('/fonts/k7.ttf') format('truetype'), url('/fonts/k7.svg#Karla') format('svg')
}
body{
font-family: Karla, sans-serif;
}
und
@font-face {
font-family: 'ico';
src: url('/fonts/ico.eot?35583524');
src: url('/fonts/ico.eot?35583524#iefix') format('embedded-opentype'),
url('/fonts/ico.woff?35583524') format('woff'),
url('/fonts/ico.ttf?35583524') format('truetype'),
url('/fonts/ico.svg?35583524#ico') format('svg');
font-weight: normal;
font-style: normal;
}