html - 非拉丁字符不适用于@font-face

标签 html css font-face

我正在尝试将字体文件导入我的网站,但非拉丁字体不起作用。

当使用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/

相关文章:

html - 丹麦 webfont 中的非 ASCII 字符显示不正确

javascript - 灯箱在没有目标图像的情况下自行启动

php - 为什么我的表单向我发送的数据添加选项卡?

css - HTML 和 CSS 在一行之间对齐 div

java - 在 thymeleaf 中为变量名设置值

jquery - div 中的相关边距

java - 在Spring元素中添加css和js

html - 缩小时背景图片的解决方法

css - 使用@font-face 打印网页

css - 字体未加载到我的 html 页面