Re: [csswg-drafts] [css-fonts] Don't require browsers to always match every generic font family to a concrete font family (#4442)

Let's say your font stack is: `p {font-family: fantasy, Helvetica; }` on a system which has chosen not to map `fantasy` to anything (or equivalently, to a conceptual font with no glyphs in it).
You try to display `<p>hello world</p>` with it. If you don't like the idea of mapping `fantasy` to nothing, replace with `fangsong` with no loss of generality.

If we've ruled out option 2 (which disallows falling back from a generic family and requires that it maps to something for all glyphs), the logical thing (option 1) to do is to say that since `fantasy` doesn't match, then not only is helvetica (assuming it's actually available) the font that's actually used to render the text, but also since `fantasy` has no glyphs, Helvetica is also the **first available font**, and therefore its metrics are used to determine the line-height, `ch` unit, `ex` unit, etc. I support this.

"option 3" proposes one possible way to interpret the sentence about generic families always having to match that you propose to delete, would be to say that `fantasy` is in this case the first available font, and that the various things discussed above are based on it. That doesn't really say what they'd be, given that it's a conceptual font with no glyphs (and no obvious metrics) in it, but at least it wouldn't be based on helvetica. I think this is far fetched and undesirable, but if that sentence is there and means something I can't think of anything else than "option 2" or this "option 3".

Option 1 seems useful. Option 2 less so, but still sane. Option 3 seems just bad/silly to me. If anyone has a different understanding of what that sentence means, it'd be good to hear it before we remove it.

-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4442#issuecomment-547296283 using your GitHub account

Received on Tuesday, 29 October 2019 07:45:53 UTC