在该网站上,我从本地文件夹连接谷歌字体[Roboto Condensed font],并获得一种在西里尔文和拉丁文的某些字母中都有孔的字体。这是为什么以及如何解决它?
PS我想过转换字体本身,但是如果你在 styles 中保留唯一的原始格式.woff2,那么就没有区别。
/* cyrillic */
@font-face {
font-family: 'Roboto Condensed';
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: local('Roboto Condensed'), local('RobotoCondensed'),
url(../../fonts/RobotoCondensed-cyrillic.otf) format('opentype'),
url(../../fonts/RobotoCondensed-cyrillic.ttf) format('truetype'),
url(../../fonts/RobotoCondensed-cyrillic.woff) format('woff'),
url(../../fonts/RobotoCondensed-cyrillic.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
font-family: 'Roboto Condensed';
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: local('Roboto Condensed'), local('RobotoCondensed'),
url(../../fonts/RobotoCondensed-latin.otf) format('opentype'),
url(../../fonts/RobotoCondensed-latin.ttf) format('truetype'),
url(../../fonts/RobotoCondensed-latin.woff) format('woff'),
url(../../fonts/RobotoCondensed-latin.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


您的连接字体顺序不正确。有必要从现代的连接到需求较少的连接。是的,到 2024 年你就可以离开它了
woff2woff。也许您的浏览器版本无法再正确处理这些格式。PS你确定
src: local('Roboto Condensed')你的局域网上有正常版本吗?