subfont: Missing glyph fallback detected
In my project I’ve added link to google fonts:
<link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@300;400&family=Roboto:ital,wght@0,300;0,400;0,500;0,700;0,900;1,400&display=swap" rel="stylesheet"/>
and process the resulting html using subfont.
Locally on mac everything works great, but during github action execution on ubuntu-latest I’ve got following warning (more like an error actually):
WARN: Missing glyph fallback detected.
When your primary webfont doesn't contain the glyphs you use, browsers that don't support unicode-range will load your fallback fonts, which will be a potential waste of bandwidth.
These glyphs are used on your site, but they don't exist in the font you applied to them:
- \u{20} ( ) in font-family 'Roboto' (300/normal) at out/ru/course/react/junior/index.html:1:10
- \u{21} (!) in font-family 'Roboto' (300/normal) at out/ru/course/react/junior/index.html:1:2
- \u{28} (() in font-family 'Roboto' (300/normal) at out/ru/course/react/junior/index.html:1:223
- \u{29} ()) in font-family 'Roboto' (300/normal) at out/ru/course/react/junior/index.html:1:242
- \u{2b} (+) in font-family 'Roboto' (300/normal) at out/ru/course/react/junior/index.html:1:97
...
For some reason it only happens for this particular font. I guess fonts.googleapis.com respond with different css stylesheet depending on OS and environment. Any ideas of what is happening here and how it could be solved?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16
Working on a fix here: https://github.com/Munter/subfont/pull/115