Re: [csswg-drafts] [meta] [css-fonts] Criteria for generic font families (#4910)

The generic concept always seemed to me like the first step of a versatile font selection mechanism. I believe the ability to request (not supply) a font with certain characteristics would be very useful. These requests seem reasonable:

* a sans-serif font that supports weights: 100, 200, 400, 700, 900
* a serif font that explicitly supports optical size: 8, 12, 16
* a font that supports specific languages or characters (this would help authors avoid the problem of a fallback font interrupting the text to supply characters missing from fonts earlier in the stack)
* a font named “Baskerville” that supports polytonic Greek

Using a function-like syntax we could construct selection requests such as:

* `select(style=sans-serif; weight-range:100,200,400,700,900)`
* `select(style=serif; optical-size-range:8,12,16)`
* `select(font-family=Baskerville; lang=el; characters=Ἕἧ)`

The unpredictability of such a system with a large number of fonts installed might be problematic, though if implemented in a browser (e.g. Safari) that disallows user-installed fonts, the risk of obtaining an unsuitable font can be contained at reasonable cost.

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

Received on Friday, 1 May 2020 09:32:26 UTC