是否可以使用自定义字体 - 使用 font-face? [英] Is it possible to use custom fonts - using font-face?

查看:34
本文介绍了是否可以使用自定义字体 - 使用 font-face?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够在网页中嵌入字体并为其设置样式,以便在 Android 和 iPhone 上查看,并且运行良好.但是,它不会在 Windows Phone 7.5 上呈现.

I'm able to embed and style a font-face in a webpage to view on Android and iPhone, and it works fine. However, it will not render on Windows Phone 7.5.

我尝试将字体嵌入到 CSS 中:

I've tried embedding the font into the CSS:

@font-face {
    font-family:'MyFont';
    src: url(data:font/woff;charset=utf-8;base64,d09GR...
}

...并且还提供了eot/ttf文件,使用了适用于所有其他浏览器的声明-

...and also provided eot / ttf files, using a declaration that works across all other browsers -

@font-face {font-family:'MyFont';src:url('../fonts/MyFont-webfont.eot');src:url('../fonts/MyFont-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/MyFont-webfont.svg#MyFontRegular') format('svg'), url('../fonts/MyFont-webfont.woff')format('woff'), url('../fonts/MyFont-webfont.ttf') format('truetype');font-weight:normal;font-style:normal;}

...但仍然没有运气.我不敢相信新的 Windows 手机不允许嵌入字体,并且只支持有限的字体列表,如:

...but still no luck. I can't believe that the new Windows phones do not allow for font embedding, and only support a limited list of fonts, as mentioned in:

http://msdn.microsoft.com/en-us/library/hh202920%28v=vs.92%29.aspx

即使它是一个 Javascript 渲染解决方案,任何见解/提示或技巧都会很棒......必须有某种解决方法!

Even if it's a Javascript rendering solution, any insight / hints or tips would be great...there must be some kind of workaround!

推荐答案

根据 这篇博文它是 WP7 上 IE9 和 IE9 之间的17 个差异"之一.
这是 MSDN 文章确认.

According to this blog post it's one of the "17 differences" between IE9 and IE9 on WP7.
And here's the MSDN article which officially confirms it.

这篇关于是否可以使用自定义字体 - 使用 font-face?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆