0
我们的项目有一个@font-face
规则像这样使用自定义字体:TTF字体是否适用于Android 4.0.3的默认浏览器?
@font-face {
font-family: "Foo Light";
src: url("foo.eot"); /* IE9 Compat Modes */
src: url("foo.eot?#iefix") format('embedded-opentype'), /* IE6-IE8 */
url("foo.woff") format("woff"), /* Modern Browsers */
url("foo.ttf") format("truetype"), /* Safari, Android, iOS */
url("foo.svg#ca4650e2-5aa3-4755-9c6d-256cbb4f5115") format("svg"); /* Legacy iOS (and Galaxy S2/Android 4.0.3 and possibly other Android 4.0.3 devices) */
}
我们面临的SVG字体和text-overflow: ellipsis
的问题(见here [搜索省略号])。由于我们不再支持传统iOS设备,因此我删除了SVG字体回退以修复省略号错误。
然后Android 4.0.3的默认浏览器(在Galaxy S2上)停止使用我们的自定义字体。发现它也回落在SVG上,而Android 2.3和更新的Android设备可以使用TTF字体。
有没有人遇到过Android 4.0.3默认浏览器不支持TTF字体的问题?是否有任何解决方法?
问题是,在这种情况下,只有SVG字体适用于Android 4.0.3/Galaxy S2以及标准英文字符。 – Behrang
您尝试使用的确切字体是什么?我可以下载并测试它吗? – user2455524
有问题的字体是“VAG Rounded W01 Light”和“VAG Rounded W01 Bold”。你可以从[这里]下载它们(http://mobile.yellow.com.au/static/SDjL2Y6JwCoSi2fs2u8oXRWRJQRSrtxIcE2dWscG8pF.css)。只要搜索'font-face'。如果我们删除SVG字体后备,Galaxy S II/Android 4.0.3不会选取TTF字体。 – Behrang