Firefox 和 Safari 不使用带有阿拉伯连字的字体呈现文本
这是一个示例字形形式的 svg 字体:
<glyph unicode="بِسْمِ" glyph-name="uniFB51" horiz-adv-x="1423" d="path.." />
尝试用英文文本替换阿拉伯连字,它的工作原理!
<glyph unicode="1234" glyph-name="uniFB51" horiz-adv-x="1423" d="path.." />
这两个浏览器有什么问题?我该如何解决这个问题,我在连字方面做错了吗?
DEMO: http: //ligga.herokuapp.com/ 请在 chrome 和 firefox 中测试 demo 看看有什么不同。
我用来启用 ligga 功能的 CSS:
[class^="icon-"], [class*=" icon-"] {
font-family: 'icomoon' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
letter-spacing: 0;
-webkit-font-feature-settings: "liga";
-moz-font-feature-settings: "liga=1";
-moz-font-feature-settings: "liga";
-ms-font-feature-settings: "liga" 1;
font-feature-settings: "liga";
-webkit-font-variant-ligatures: discretionary-ligatures;
font-variant-ligatures: discretionary-ligatures;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
截图
火狐
铬合金
不使用字体呈现文本的浏览器是:
- Mac 上的火狐
- 苹果浏览器
正确呈现文本的浏览器:
- 所有操作系统上的 Chrome(在 mac、android、ubuntu、windows 上测试)
- Opera(在安卓上测试)
- Windows 上的 Firefox(这很奇怪,Firefox 不是在所有平台上都使用相同的引擎(Gecko)吗?)