【问题标题】:using @font-face rule and only special characters won't show in IE使用@font-face 规则,只有特殊字符不会在 IE 中显示
【发布时间】:2014-09-18 13:55:05
【问题描述】:

我正在使用@font-face 规则,它在 chrome 和 firefox 上运行良好,但在 IE 中打开时它不会读取特殊字符(ć、č、š ..)。是因为字体格式吗?我认为问题出在 .eot 中,但如果我删除它,那么它根本不会在 IE 中打开。有没有人有任何想法?

这是我的代码:

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

【问题讨论】:

    标签: html css fonts font-face


    【解决方案1】:

    使用这种风格

    @font-face{

    font-family:'font1';
    src:url('font/B_Titr_Bold.eot');
    src:
        url('f1o1n1t1s/B_Titr_Bold.eot?#iefix') format('embedded-opentype'),
        url('f1o1n1t1s/B_Titr_Bold.ttf') format('truetype'),
        url('f1o1n1t1s/B_Titr_Bold.otf') format('opentype'),
        url('f1o1n1t1s/B_Titr_Bold.svg') format('svg');
        font-weight: bold;
        font-style: normal;
    }
    

    将您的代码更改为

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

    为什么“哇”!? 不需要。


    注意<mete>s 使用:

    <meta charset="utf-8">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    

    在头标签中。

    结束

    使用 unicode

    <p>\u0200</p> for È
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-09-07
      • 1970-01-01
      • 2016-10-16
      • 1970-01-01
      • 2016-07-04
      • 2013-03-22
      • 2011-06-19
      相关资源
      最近更新 更多