- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Wed, 02 May 2018 23:36:17 +0000
- To: public-css-archive@w3.org
This has a lot more indirection than I think is needed. Maybe:
```webidl
interface FontFaceFeatures {
maplike<DOMString, (long or null)>;
/* null for the name-only features like ss01 */
};
interface FontFaceVariationAxis {
readonly DOMString name;
readonly DOMString axisTag;
readonly double minimumValue;
readonly double maximumValue;
readonly double defaultValue;
};
interface FontFaceVariations {
readonly setlike<FontFaceVariationAxis>;
};
interface FontFacePalette {
iterable<DOMString>;
readonly attribute unsigned long length;
getter DOMString (unsigned long index);
/* arraylike! using the TypedOM pattern, which seems to be right */
readonly bool usableWithLightBackground;
readonly bool usableWithDarkBackground;
};
interface FontFacePalettes {
iterable<FontFacePalette>;
readonly attribute unsigned long length;
getter FontFacePalette (unsigned long index);
};
partial interface FontFace {
readonly FontFaceFeatures features;
readonly FontFaceVariations variations;
readonly FontFacePalettes palettes;
};
```
Should the things on `FontFace` be methods returning the objects instead? That way browsers don't have to initialize them immediately and allocate objects (or do trickery to late-create them on request).
--
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/520#issuecomment-386153230 using your GitHub account
Received on Wednesday, 2 May 2018 23:36:21 UTC