我在dev tools网络窗格中注意到,我的字体文件没有显示出来。(Roboto)字体仅用作webserver文件夹中的本地文件,内嵌css @face face、woff2、woff、ttf和svg。
Firefox上周在日志中显示了这些网页字体,但在第107版中就不再显示了。
我试过chomium,看到在Chromium70中加载字体文件,更新到Chromium110:从网络日志中消失。我发现Roboto安装在我的Windows /字体中,删除了它,现在两个新浏览器都重新加载了webfonts。这种行为是可逆的。回到旧的浏览器版本将加载所有字体面的网页字体,不管哪个是安装的。
我错过了什么?
谢谢<3
发布于 2022-11-21 15:32:13
CSS文件从2018年开始使用google webfonts助手:https://google-webfonts-helper.herokuapp.com/fonts/roboto?subsets=latin生成的@字体面,现在似乎"src:local“选项是空的,以防止这种冲突。(仍然奇怪的是,为什么现在这件事,但不是上周)
2018年:"src: local“的字体名为=>已安装的系统字体。
/* roboto-regular - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url('fonts/roboto-v18-latin-regular.eot'); /* IE9 Compat Modes */
src: local('Roboto'), local('Roboto-Regular'),
url('fonts/roboto-v18-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('fonts/roboto-v18-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('fonts/roboto-v18-latin-regular.woff') format('woff'), /* Modern Browsers */
url('fonts/roboto-v18-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('fonts/roboto-v18-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */
}2022:"src: local“为空,=>将始终加载will字体。
/* roboto-regular - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url('../fonts/roboto-v30-latin-regular.eot'); /* IE9 Compat Modes */
src: local(''),
url('../fonts/roboto-v30-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/roboto-v30-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/roboto-v30-latin-regular.woff') format('woff'), /* Modern Browsers */
url('../fonts/roboto-v30-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/roboto-v30-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */
}https://stackoverflow.com/questions/74519903
复制相似问题