Prevent ligatures in Safari (Mavericks/iOS7) via CSS

房东的猫 提交于 2019-11-26 17:14:58

问题


Is there any possibility to prevent Safari/Mobile Safari on Mavericks/iOS7 from rendering ligatures in a Webfont? We're facing issues with not available ligatures in the font beeing displayed as white space.

We already tried using this in the CSS:

-webkit-font-feature-settings:"liga" 0; 
font-feature-settings:"liga" 0; 
text-rendering: optimizeSpeed;

But it's not working, the ligatures are still blank spaces.


回答1:


We solved this by adding

 -webkit-font-variant-ligatures: no-common-ligatures;

to the css styles. It prevents the ligatures from appearing and thus the broken symbols in the font.




回答2:


More Recent (2018):

The one that worked for us is stated in here: https://stackoverflow.com/a/47063000/1920145

Refering to use the current state of the rule:

font-variant-ligatures: none;


来源:https://stackoverflow.com/questions/19591746/prevent-ligatures-in-safari-mavericks-ios7-via-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!