简体   繁体   English

IE10中的Kudakurage Ligature字体

[英]Kudakurage Ligature fonts in IE10

I've been attempting to use the Kudakurage Ligature fonts on my site. 我一直在尝试在我的网站上使用Kudakurage Ligature字体。 It works in all "modern browsers", however for some reason, it doesn't seem to work on IE10. 它适用于所有“现代浏览器”,但是由于某种原因,它似乎不适用于IE10。

If I create a separate html file with a few elements to test the fonts, it works just fine! 如果我创建了一个单独的html文件,其中包含一些要测试字体的元素,那么效果很好!

The code that I've used is exactly the same, and I've used the debug tool to ensure that none of the CSS rules are over-ridden. 我使用的代码完全相同,并且使用调试工具来确保没有CSS规则被覆盖。

Would really like some help over this issue. 真的希望对此问题有所帮助。 I don't want to resort to the old trick of using images on my site again :( 我不想求助于在我的网站上再次使用图片的旧技巧:(

Code used: HTML: 使用的代码:HTML:

<div onclick="refresh();" class="lsf">refresh</div>

CSS: CSS:

@font-face {
    font-family: 'LigatureSymbols';
    src: url('LigatureSymbols-2.11.eot');
    src: url('LigatureSymbols-2.11.eot?#iefix') format('embedded-opentype'),
         url('LigatureSymbols-2.11.woff') format('woff'),
         url('LigatureSymbols-2.11.ttf') format('truetype'),
         url('LigatureSymbols-2.11.svg#LigatureSymbols') format('svg');
    src: url('LigatureSymbols-2.11.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.lsf {
    font-family: 'LigatureSymbols' !important;
    -webkit-text-rendering: optimizeLegibility;
    -moz-text-rendering: optimizeLegibility;
    -ms-text-rendering: optimizeLegibility;
    -o-text-rendering: optimizeLegibility;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-font-smoothing: antialiased;
    -ms-font-smoothing: antialiased;
    -o-font-smoothing: antialiased;
    font-smoothing: antialiased;
    -webkit-font-feature-settings: "liga" 1, "dlig" 1;
    -moz-font-feature-settings: "liga=1, dlig=1";
    -ms-font-feature-settings: "liga" 1, "dlig" 1;
    -o-font-feature-settings: "liga" 1, "dlig" 1;
    font-feature-settings: "liga" 1, "dlig" 1;
}

The Kudakurage Ligature font can be obtained at: http://kudakurage.com/ligature_symbols/ 可以在以下网址获取Kudakurage Ligature字体: http ://kudakurage.com/ligature_symbols/

Can you see the icons with IE10 on http://kudakurage.com/ligature_symbols/ ? 您可以在http://kudakurage.com/ligature_symbols/上看到带有IE10的图标吗? Yes? 是? I thought so. 我是这么想的。 I'm happy for you there is nothing wrong with your browser. 我为您感到高兴,您的浏览器没有错。 ;) ;)

There could be a couple of other things wrong. 可能还有其他几处错误。 Most of the time it boils down to: 在大多数情况下,它归结为:

  1. Font file isn't where you say it is. 字体文件不在您说的地方。
  2. Other CSS problem. 其他CSS问题。

I created a example: http://jsfiddle.net/allcaps/7FL6C/2/ it shows a working example and the fail 'FAIL NO FONT scenario'. 我创建了一个示例: http : //jsfiddle.net/allcaps/7FL6C/2/,它显示了一个有效的示例,但失败了“ FAIL NO FONT业务情景”。

/* FAIL NO FONT scenario */
@font-face {
    font-family: 'LigatureSymbols_1';
    src: url('there/is/no/font/here/LigatureSymbols-2.11.eot');
    src: url('there/is/no/font/here/LigatureSymbols-2.11.eot?#iefix') format('embedded-opentype'),
         url('there/is/no/font/here/LigatureSymbols-2.11.woff') format('woff'),
         url('there/is/no/font/here/LigatureSymbols-2.11.ttf') format('truetype'),
         url('there/is/no/font/here/LigatureSymbols-2.11.svg#LigatureSymbols') format('svg');
    src: url('there/is/no/font/here/LigatureSymbols-2.11.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

In a debugger you get a 404: 在调试器中,您得到404:

404

The answer to your question is make sure the font loads. 您的问题的答案是确保加载字体。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM