【问题标题】:Chrome developer tools crashes with specific font usageChrome 开发者工具因使用特定字体而崩溃
【发布时间】:2014-01-25 10:25:12
【问题描述】:

我正在使用一种名为“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;
} 

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

有什么建议吗?

【问题讨论】:

    标签: css google-chrome fonts crash font-face


    【解决方案1】:

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

    【讨论】:

    • 使用 Google 会导致呈现问题。无论如何,将代码放在 CSS 文件的顶部后,问题就解决了..
    猜你喜欢
    • 2012-09-23
    • 1970-01-01
    • 2018-02-19
    • 2019-03-03
    • 2017-01-11
    • 2016-09-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多