W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2020

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

From: Laurence Penney via GitHub <sysbot+gh@w3.org>
Date: Fri, 01 May 2020 09:32:24 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-622319199-1588325543-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:06 UTC