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

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

问题描述

我可以在网页中嵌入和设置一个字体,以在Android和iPhone上查看,它可以正常工作。但是,它不会在Windows Phone 7.5上呈现。



我已尝试将字体嵌入CSS:

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

...并提供eot / ttf文件,使用在所有其他浏览器中可用的声明 -

  @ font-face {font-family:'MyFont'; src:url('../ fonts / MyFont-webfont.eot'); src:url('../ fonts / MyFont-webfont。 eform?#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手机不允许字体嵌入,并且只支持有限的字体列表,如下所示:



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

即使它是一个Javascript渲染解决方案,任何洞察/提示或提示将是伟大的...必须有一些解决方法!

解决方案

根据它是IE9和IE9之间的17差异在WP7。

这里是
MSDN文章,正式确认。


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.

I've tried embedding the font into the CSS:

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

...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;}

...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

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

解决方案

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天全站免登陆