相关疑难解决方法(0)

@ font-face src:local - 如果用户已有本地字体,如何使用本地字体?

什么是正确的使用方式,@font-face以便浏览器不会下载字体,如果用户已经拥有它?

我正在使用@ font-face来定义DejaVu,它已经安装在我的系统(linux)上.Firefox没有下载字体,但Chromium每次都下载它!

我的CSS代码,基于字体松鼠,这个问题看起来像这样:

@font-face {
    font-family: 'DejaVu Serif';
    src: url('DejaVuSerif-webfont.eot');
    src: local('DejaVu Serif'), url('DejaVuSerif-webfont.woff') format('woff'), url('DejaVuSerif-webfont.ttf') format('truetype'), url('DejaVuSerif-webfont.svg#webfontCFu7RF0I') format('svg');
    font-weight: normal;
    font-style: normal;
}

/* ... @font-face definitions for italic and bold omitted ... */

@font-face {
    font-family: 'DejaVu Serif';
    src: url('DejaVuSerif-BoldItalic-webfont.eot');
    src: local('DejaVu Serif Bold Italic'), url('DejaVuSerif-BoldItalic-webfont.woff') format('woff'), url('DejaVuSerif-BoldItalic-webfont.ttf') format('truetype'), url('DejaVuSerif-BoldItalic-webfont.svg#webfontQAewh7pf') format('svg');
    font-weight: bold;
    font-style: italic;
}
Run Code Online (Sandbox Code Playgroud)

css font-face

64
推荐指数
1
解决办法
9万
查看次数

标签 统计

css ×1

font-face ×1