css - Chrome 开发者工具因使用特定字体而崩溃

标签 css google-chrome fonts crash font-face

我使用的是一种名为“Lato”的字体,它是从作者网站下载的,并使用 fontsquirrel 转换为正确的格式。

包含以下 CSS 后,当我尝试检查文本元素时,Chrome 开发者工具崩溃了。

这里是我使用的字体代码:

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

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

即使我只使用这些字体声明之一,也会发生这种情况。

有什么建议吗?

最佳答案

这种字体似乎在 Google Fonts 上 - 假设它是同一字体?试试这个而不是 Font Squirrel 转换:http://www.google.com/fonts#UsePlace:use/Collection:Lato

关于css - Chrome 开发者工具因使用特定字体而崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20976687/

相关文章:

html - 文本区域中的字体一致性

ios - 如何以编程方式在 iOS 中使用自定义字体(例如 : Helvetica CY. ttf)和 Xcode

java - 为什么 java 1.7 中的字体与 1.6 中的字体不同?

html - 使尚未成为响应式轮播

javascript - 悬停进/出使我的 div 闪烁

google-chrome - 如何在 Google Chrome 中设置上下文菜单,以便所有菜单都是顶级的?

javascript - 专注于 jquery tokeninput 元素(Chrome 和 Opera)

html - 使用Safari时空白区域覆盖网页

javascript - “Read more” 切换不是字符数量而是句子长度

javascript - 强制 Chromium 每页使用不同的 cookie jar