Re: [csswg-drafts] [css-fonts-4] [varfont] Supported variation font axes and font features are not discoverable

> Why should one have to write JS for these things?

Because there's no reasonable way to talk about a single individual font file in CSS, but there is in JS.  CSS just has a concept of a font stack, composed of family names, each of which is composed of 1 or more composite font faces, each of which is composed of one or more individual font faces/files (you can combine multiple faces into one composite face via `unicode-range`).  It's the individual faces that you need to know about to tell if a variation axis exists.

> And why should one have to use the font loading API if they aren't even loading any fonts, but instead using only the browsers preloaded fonts?

I didn't say you'd use the font loading API. I said you'd use the FontFace API, which happens to be defined in the spec called Font Loading.  Nothing needs to be "loaded" to use this.  It's just the right API location for this sort of ability to live.

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

Received on Thursday, 1 June 2017 22:14:27 UTC