我有我自己的圖標字體,所以我有10個圖標。主要問題如下。 8的他們的網站上顯示良好,但其中2顯示像我給他們的信(「F」和「E」)圖標字體不顯示一些圖標
例如,這是我如何插入我的圖標
。 test-icon-user1:before {content:「\ 61」;}
.test-icon-user2:before {content:「\ 62」;}
.test-icon-user3:before {content:「\ 「;」
.test-icon-user4:before {content:「\ 64」;}
.test-icon-user5:before {content:「\ 65」;}
.test-icon-user6 :before {content:「\ 66」;}
.test-icon-user7:before {content:「\ 67」;}
其中只有2個不起作用...這很奇怪,因爲我插入它們的方式是一樣的,樣式表加載好,一切都很好。
這是怎麼樣子。
這是我如何通過HTML插入(名字是不完全一樣的原始,所以我必須檢查所有更多鈔票拼寫錯誤)
<a id="sticky-login-toggle" class="test-icon-user1 sticky-toggle"></a>
最後我如何插入圖標字體
@font-face {
font-family: "test";
src:url("fonts/test.eot");
src:url("fonts/test.eot?#iefix") format("embedded-opentype"),
url("fonts/test.woff") format("woff"),
url("fonts/test.ttf") format("truetype"),
url("fonts/test.svg#test") format("svg");
font-weight: normal;
font-style: normal;
}
[class^="icon-"]:before,
[class*=" test-icon-"]:before {
font-family: "test" !important;
font-style: normal !important;
font-weight: normal !important;
font-variant: normal !important;
text-transform: none !important;
speak: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
爲什麼您的圖標字體沒有設置PUA中的字形,並且GSUB規則將該圖標的名稱替換爲該PUA代碼點?現在你的圖標字體假裝成拉丁字體,而絕對不是一個。 –
對不起,但我沒有承諾。請問你能否解釋一下,也許這可能是解決方案 –
字體有兩組字形:真正的字形,真實的語言,然後是「這些形狀與實際語言或unicode等無關」的專用區。所以如果你製作了一個適當的圖標字體,你要確保字體將所有這些圖標存儲爲私有使用區域形狀,然後添加GSUB替換規則,在那裏你告訴字體「如果你被要求塑造單詞」笑臉「而是在PUA spot 12「中呈現圖標或其他東西。你做了什麼你的字體? –