【问题标题】:Embedding a base 64 truetype font with @font-face in a svg file, does not work in IE在 svg 文件中嵌入带有 @font-face 的 base 64 truetype 字体,在 IE 中不起作用
【发布时间】:2015-09-08 15:51:49
【问题描述】:

我有一个独立的 SVG 文档,没有任何外部依赖项。我正在使用嵌入在 base64 中的自定义字体。

我正在使用@font-face 嵌入字体:

@font-face{font-family:'a_e2ef524fbf3d9fe611d5a8e90fefdc9c';src:url(data:font/truetype;charset=utf-8;base64,[BASE64_CODE])format('truetype');font-weight:normal;font-style:normal;}

该字体在 Chrome 和 FireFox 中呈现良好,但在 Internet Explorer(任何版本)中不呈现。

windows 属性显示字体是可安装的。

我会感谢任何帮助。提前致谢!

【问题讨论】:

    标签: html internet-explorer svg fonts base64


    【解决方案1】:

    我已经解决了这个问题,问题是字体名称的长度(a_e2ef524fbf3d9fe611d5a8e90fefdc9c)。

    似乎 IE 不喜欢超过 31 个字符的名称...我只是将名称更改为“aaa”,字体呈现正常!

    See here for an example(用IE打开)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-04-19
      • 2012-08-04
      • 1970-01-01
      • 1970-01-01
      • 2013-08-19
      • 2021-08-27
      • 2012-09-21
      • 2015-05-28
      相关资源
      最近更新 更多