Einige bootstrap glyphicons nicht laden

Habe ich ein WordPress-theme, dass ich Gebäude mit Bootstrap Sass Quelle. Die styles sind in Arbeit, aber die meisten die glyphicons nicht (nur Sternchen und plus). Ich kompiliere meine Bootstrap in die style.css und relativ zu diesem ist ein Ordner namens fonts hält, die die glyphicons (ich habe die $icon-font-path: "fonts/";) Hier ist ein Ausschnitt aus meinem kompiliert style.css zu zeigen, dass die Schriften Pfad korrekt ist:

@font-face { font-family: 'Glyphicons Halflings'; src: url("fonts/glyphicons-halflings-regular.eot"); src: url("fonts/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"), url("fonts/glyphicons-halflings-regular.woff2") format("woff2"), url("fonts/glyphicons-halflings-regular.woff") format("woff"), url("fonts/glyphicons-halflings-regular.ttf") format("truetype"), url("fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg"); }
.glyphicon { position: relative; top: 1px; display: inline-block; font-family: 'Glyphicons Halflings'; font-style: normal; font-weight: normal; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

E.g, diese Arbeit:

<span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span>
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>

Aber diese nicht:

<span class="glyphicon glyphicon-thumbs-up" aria-hidden="true"></span>
<span class="glyphicon glyphicon-heart" aria-hidden="true"></span>

Hier ist ein Ausschnitt des glyphicon-Klassen:

.glyphicon-asterisk:before { content: "\2a"; }
.glyphicon-plus:before { content: "\2b"; }  
.glyphicon-star:before { content: \e006; }
.glyphicon-thumbs-up:before { content: \e125; }

Ich habe in der Netzwerk-Registerkarte, um zu sehen, ob es am laden war die glyphicon-Schriften, und Sie werden nur angezeigt, wenn die glyphicons Arbeit (Stern, plus). Andernfalls wird die schriftart-Datei gar nicht angezeigt in der Registerkarte "Netzwerk" (nicht einmal ein 404).

Ich erinnere mich, vor einiger Zeit wurde der bootstrap-compiler erstellen ungültige schriftart-Dateien. In dieser Zeit werden die Symbole entweder zeigte das falsche Symbol oder nur einen kleinen Platz, um anzuzeigen, ein unbekanntes Zeichen. Sehen Sie das Quadrat, wenn Sie die icons benutzen, die nicht funktionieren? EDIT: Hier ist ein link zu einer Antwort, die zeigt, was ich Rede - stackoverflow.com/a/18474869/2375493

InformationsquelleAutor Jonny | 2015-02-01

Schreibe einen Kommentar