简体   繁体   English

Microsoft边缘中的字体连字图标

[英]Font ligature icons in Microsoft edge

I'm using google material Icon font library for the majority of icons in a web app. 我正在为网络应用中的大多数图标使用谷歌素材图标字体库。 I've started debugging for Microsoft Edge and realised none of them are showing. 我已经开始为Microsoft Edge进行调试,并意识到它们都没有显示出来。

Is this a known issue? 这是一个已知的问题? I can switch to actual icon images if need be but it would be a massive job at this stage. 如果需要,我可以切换到实际的图标图像,但在这个阶段它将是一个巨大的工作。

Try to use F12 developer tools to check whether the Google Icons CSS reference load success. 尝试使用F12开发人员工具检查Google Icons CSS引用是否加载成功。

The following code works well on Edge 42 and Edge 44 version: 以下代码适用于Edge 42和Edge 44版本:

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<style type="text/css">
    @font-face {
        font-family: 'Material Icons';
        font-style: normal;
        font-weight: 400;
        src: url(https://example.com/MaterialIcons-Regular.eot); /* For IE6-8 */
        src: local('Material Icons'), local('MaterialIcons-Regular'), url(https://example.com/MaterialIcons-Regular.woff2) format('woff2'), url(https://example.com/MaterialIcons-Regular.woff) format('woff'), url(https://example.com/MaterialIcons-Regular.ttf) format('truetype');
    }

    .material-icons {
        font-family: 'Material Icons';
        font-weight: normal;
        font-style: normal;
        font-size: 24px; /* Preferred icon size */
        display: inline-block;
        line-height: 1;
        text-transform: none;
        letter-spacing: normal;
        word-wrap: normal;
        white-space: nowrap;
        direction: ltr;
        /* Support for all WebKit browsers. */
        -webkit-font-smoothing: antialiased;
        /* Support for Safari and Chrome. */
        text-rendering: optimizeLegibility;
        /* Support for Firefox. */
        -moz-osx-font-smoothing: grayscale;
        /* Support for IE. */
        font-feature-settings: 'liga';
    }
</style>
<i class="material-icons">face</i>

The output screenshot as below: 输出截图如下:

在此输入图像描述

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

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