feature request: @font-face coverage
I'm thinking of adding Noto fonts to my site, but I sometimes use characters from all over Unicode and the Noto fonts are split up by script (mostly). So each time I use a new Unicode script in the html text, I'd need to add the appropriate font. Would it make sense to add a test here that for any html text covered by a css font-family that references one or more custom fonts, every character[^1] in that text must be covered by at least one of the custom fonts?
So if I have `font-family: "Noto Serif", serif` and `<p>Ogham text is often surrounded by ᚛ and ᚜`, then html-proofer could raise an error that ᚛ and ᚜ are not in "Noto Serif", even if they are in the fallback `serif`. The error could be fixed by removing the `font-family` entirely, changing it to `font-family: serif`, or changing it to `font-family: "Noto Serif", "Noto Sans Ogham", serif`
[^1]: It's probably a bit more complicated than every character. E.g., 🏴 is a black flag emoji followed by tag characters. So the combined Scottish flag should be in the custom fonts, but it doesn't matter if the individual tag characters are in the custom fonts. If you think the idea is good, then I think extended grapheme clusters might be the right unit to look up in a font.
2 条评论