0

我正在为我的网站使用 Icomoon。它正确显示前 9 种字体。

这是我的代码(CSS):

@font-face {
    font-family: 'icomoon';
    src:url('font/icomoon.eot');
    src:url('font/icomoon.eot?#iefix') format('embedded-opentype'),
        url('font/icomoon.woff') format('woff'),
        url('font/icomoon.ttf') format('truetype'),
        url('font/icomoon.svg#icomoon') format('svg');
    font-weight: normal;
    font-style: normal;
}
[data-icon]:before { 
    font-family: 'icomoon';
    content: attr(data-icon); 
    speak: none;
}

这是我的代码(HTML):

<span aria-hidden="true" data-icon="&#xe000;"></span>
<span aria-hidden="true" data-icon="&#xe001;"></span>
<span aria-hidden="true" data-icon="&#xe002;"></span>
<span aria-hidden="true" data-icon="&#xe003;"></span>
<span aria-hidden="true" data-icon="&#xe004;"></span>
<span aria-hidden="true" data-icon="&#xe005;"></span>
<span aria-hidden="true" data-icon="&#xe006;"></span>
<span aria-hidden="true" data-icon="&#xe007;"></span>
<span aria-hidden="true" data-icon="&#xe008;"></span>
<span aria-hidden="true" data-icon="&#xe009;"></span>

上面的所有代码都运行良好,除了这些:

<span aria-hidden="true" data-icon="&#xe00a;"></span>
<span aria-hidden="true" data-icon="&#xe00b;"></span>
<span aria-hidden="true" data-icon="&#xe00c;"></span>
<span aria-hidden="true" data-icon="&#xe00d;"></span>
<span aria-hidden="true" data-icon="&#xe00e;"></span>

我从 Icomoon 的包中选择了它,但我认为是因为最后一个字符阻止它出现。Fe:a、b、c、d和e。

它显示类似立方体的形状。

有谁知道如何解决这些问题?

谢谢!

4

1 回答 1

0

It seems that a unique name for each generated font is required. There is an input field to the right of the Download button.

If a name has been used before, download seems to provide the font which got that name earlier and not the newly generated font.

于 2014-01-10T18:25:21.930 回答