我正在尝试将字体文件导入我的网站,但非拉丁字体不起作用。
当使用Font Squirrel webfont generator时我选择了一个专家选项,允许我选择非西方字符。
我使用 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应该有帮助
关于html - 非拉丁字符不适用于@font-face,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54550786/