Ric*_*ard 12 html css fonts webfonts google-webfonts
我正在使用Google网络字体,如下所示:
@font-face {
font-family: "Vollkorn";
font-style: normal;
font-weight: normal;
src: local('Vollkorn Regular'), local('Vollkorn-Regular'), url('http://themes.googleusercontent.com/static/fonts/vollkorn/v2/BCFBp4rt5gxxFrX6F12DKnYhjbSpvc47ee6xR_80Hnw.woff') format('woff');
}
body {
font-family: "Vollkorn", Georgia, Times, serif;
}
Run Code Online (Sandbox Code Playgroud)
在Chrome中工作,没有"闪烁的无格式文本"(如此Typekit博客文章中所述).相反,在Web字体下载完成之前,文本根本不会加载.
通过快速连接,它很棒,因为字体异步加载非常快.但是,通过缓慢的连接,页面看起来像是空的几秒钟,直到Web字体加载 - 这是可用性差.
有没有一种聪明的方法可以在佐治亚州显示文本,然后在资源加载后添加Vollkorn字体?
我想我所说的是,我实际上非常喜欢"无格式文本的闪光",而不是空白页面,并希望强制执行此行为.
您应该研究一下 Google 与其他一些网络字体服务共同开发的网络字体加载器。
http://code.google.com/apis/webfonts/docs/webfont_loader.html