嵌入字体渲染然后消失 [英] Embedded Fonts Render Then Disappear

查看:163
本文介绍了嵌入字体渲染然后消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站正在加载一些typekit字体和嵌入式图标字体。

I have a site that is loading in some typekit fonts and an embedded icon font.

它们似乎都加载在所有浏览器。但是,如果浏览器窗口在一段时间内保持不活动状态,它们会消失,系统字体将在其位置呈现。重新调整浏览器大小似乎会解决问题,并重新显示嵌入的字体。

They all seem to load in well in all browsers. However if the browser window is left inactive for a period of time they disappear and the system fonts are rendered in their place. Re-sizing the browser seems to then fix the issue and the embedded fonts reappear.

问题是很难重新创建,因为它似乎并不总是发生,但它确实发生很多的时间。到目前为止,我只看到它发生在Chrome。

The issue is very difficult to recreate as it doesn't seem to happen all the time, but it does happen a lot of the time. So far I have only seen it happen in Chrome.

其他详细信息:该网站托管在Heroku,Rails 4,Turbolinks关闭。

Other details: The site is hosted on Heroku, Rails 4, Turbolinks off.

图标字体的字体嵌入:

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

Typekit标题

<script type="text/javascript" src="//use.typekit.net/ssu8vyw.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>

任何想法?

推荐答案

这是来自Typekit的Ben。我相信这是由Chrome中的错误造成的。

This is Ben from Typekit. I believe this is being caused by a bug in Chrome.

这是问题报告,如果您想订阅更新或发表评论:
https://code.google.com/p/chromium/issues/detail?id=236298

Here is the issue report, if you would like to subscribe to updates or leave a comment: https://code.google.com/p/chromium/issues/detail?id=236298

因为这是Chrome的问题,我们似乎没有什么可以做的。好消息是它已被修复。不那么好的消息是,下一个稳定的版本将在2月出。我们会密切关注此问题,并确保Chrome在更新时已解决。

Because this is an issue with Chrome, there doesn't appear to be anything we can do on our side. The good news is it's been fixed. The not so good news is that the next stable release will be out in February. We're keeping an eye on this and will make sure it's resolved when Chrome is updated.

随时可以通过support@typekit.com与我们联系

Feel free to drop us a line at: support@typekit.com with any specific questions.

干杯,

这篇关于嵌入字体渲染然后消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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