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

@scottkellum 

> I’d want to query what font features the loaded font on that element

There can be a dozen different fonts loaded on that element, though, with a dozen different sets of features. Doing this at the element level is the wrong place.

@tabatkins

```IDL
interface FontFaceFeatures {
    maplike<DOMString, (long or null)>;
    /* null for the name-only features like ss01 */
};
```

This appears to tell you what the feature settings are, not which features are available. `FontFace` [already includes](https://drafts.csswg.org/css-font-loading-3/#dom-fontface-featuresettings) the `featureSettings` info, albeit exposed as a string.

Something like this might make more sense:

```IDL
interface FontFaceFeature {
    readonly DOMString featureTag;
    unsigned long minimumFeatureValue; // Usually 0. Maybe this member isn't even necessary.
    unsigned long maximumFeatureValue;
}

interface FontFaceFeatures {
    readonly setlike<FontFaceFeature>; // Setlike because there's no order.
};
```

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 10 September 2021 05:49:42 UTC