非拉丁字符不适用于@font-face
Non-latin characters don't work with @font-face
我正在尝试将字体文件导入我的网站,但非拉丁语无法正常工作。
在使用 Font Squirrel webfont generator 时,我 select 编辑了一个专家选项,允许我 select 非西方字符。
我用 Font Forge 测试了 .woff 文件,支持我需要的字符。
我已经添加了
<meta http-equiv="content-type" content="text/html;charset=utf-8">
HTML 标签。
所有字体文件名都是小写的。
代码如下:
@font-face {
font-family: 'worksans';
src: url('work_sans_regular/worksans-regular.woff2') format('woff2'),
url('work_sans_regular/worksans-regular.woff') format('woff'),
url('work_sans_regular/worksans-regular.eot') format('eot');
font-weight: 400;
font-style: normal;
}
html {
font-family: 'worksans';
}
当我使用字体时只有拉丁字符有字体。非拉丁字符具有后备字体。
尝试使用 unicode-range 可能就是问题所在
This 应该有帮助
我正在尝试将字体文件导入我的网站,但非拉丁语无法正常工作。
在使用 Font Squirrel webfont generator 时,我 select 编辑了一个专家选项,允许我 select 非西方字符。
我用 Font Forge 测试了 .woff 文件,支持我需要的字符。
我已经添加了
<meta http-equiv="content-type" content="text/html;charset=utf-8">
HTML 标签。
所有字体文件名都是小写的。
代码如下:
@font-face {
font-family: 'worksans';
src: url('work_sans_regular/worksans-regular.woff2') format('woff2'),
url('work_sans_regular/worksans-regular.woff') format('woff'),
url('work_sans_regular/worksans-regular.eot') format('eot');
font-weight: 400;
font-style: normal;
}
html {
font-family: 'worksans';
}
当我使用字体时只有拉丁字符有字体。非拉丁字符具有后备字体。
尝试使用 unicode-range 可能就是问题所在 This 应该有帮助