在 svg 文件中嵌入带有 @font-face 的 base 64 truetype 字体,在 IE 中不起作用

Embedding a base 64 truetype font with @font-face in a svg file, does not work in IE

我有一个独立的 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 属性显示字体可以安装。

如果有任何帮助,我将不胜感激。提前致谢!

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

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

See here for an example(用IE打开)