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

How about something like this:

```webidl
interface FontFaceFeature {
    readonly DOMString featureTag;
}

interface FontFaceFeatures {
    readonly setlike<FontFaceFeature>;
    readonly record<FontFaceFeature, long> namedInstances;
}

interface FontFaceVariationAxis {
    readonly DOMString name;
    readonly DOMString axisTag;
    readonly double minimumValue;
    readonly double maximumValue;
    readonly double defaultValue;
}

interface FontFaceVariations {
    readonly setlike<FontFaceVariationAxis>;
}

interface FontFacePaletteValue {
    readonly DOMString color;
}

interface FontFacePalette {
    readonly maplike<unsigned long, FontFacePaletteValue>
    readonly bool usableWithLightBackground;
    readonly bool usableWithDarkBackground;
}

interface FontFacePalettes {
    readonly maplike<unsigned long, FontFacePalette>;
}

dictionary FontFaceDetails {
    readonly FontFaceFeatures features;
    readonly FontFaceVariations variations;
    readonly FontFacePalettes palettes;
}

partial interface FontFace {
    readonly attribute FontFaceDetails details;
}
```

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

Received on Wednesday, 14 March 2018 07:19:51 UTC