ladybird/Userland/Libraries/LibWeb/CSS/FontFace.idl
Andrew Kaster 2bc51f08d9 LibWeb: Implement or stub FontFace interface's attribute getters/setters
We only support parsing half of these, so the ones we don't recognize
get a friendly exception thrown.
2024-05-11 07:30:29 +01:00

39 lines
1.5 KiB
Text

typedef (ArrayBuffer or ArrayBufferView) BinaryData;
dictionary FontFaceDescriptors {
CSSOMString style = "normal";
CSSOMString weight = "normal";
CSSOMString stretch = "normal";
CSSOMString unicodeRange = "U+0-10FFFF";
CSSOMString featureSettings = "normal";
CSSOMString variationSettings = "normal";
CSSOMString display = "auto";
CSSOMString ascentOverride = "normal";
CSSOMString descentOverride = "normal";
CSSOMString lineGapOverride = "normal";
};
enum FontFaceLoadStatus { "unloaded", "loading", "loaded", "error" };
// https://drafts.csswg.org/css-font-loading/#fontface-interface
[Exposed=(Window,Worker)]
interface FontFace {
// FIXME: constructor(CSSOMString family, (CSSOMString or BinaryData) source, optional FontFaceDescriptors descriptors = {});
constructor(CSSOMString family, CSSOMString source, optional FontFaceDescriptors descriptors = {});
attribute CSSOMString family;
attribute CSSOMString style;
attribute CSSOMString weight;
attribute CSSOMString stretch;
attribute CSSOMString unicodeRange;
attribute CSSOMString featureSettings;
attribute CSSOMString variationSettings;
attribute CSSOMString display;
attribute CSSOMString ascentOverride;
attribute CSSOMString descentOverride;
attribute CSSOMString lineGapOverride;
// FIXME: readonly attribute FontFaceLoadStatus status;
Promise<FontFace> load();
// FIXME: readonly attribute Promise<FontFace> loaded;
};