Nacre/vendor/servo-script-bindings/webidls/FontFace.webidl
astar76 1c078655e2 S022: MSE prototype on gst_mse (vendored script, script-bindings, servo-media*)
MediaSource, SourceBuffer, SourceBufferList over GStreamer's MSE library;
URL.createObjectURL(MediaSource); HTMLMediaElement attaches via mse://.
tests/smoke/mse.txt plays chunk-appended fMP4 and WebM.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-12 10:21:01 -06:00

55 lines
1.8 KiB
Text

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
typedef DOMString CSSOMString;
dictionary FontFaceDescriptors {
CSSOMString style = "normal";
CSSOMString weight = "normal";
CSSOMString width;
CSSOMString stretch = "normal"; // alias for width, sets the same attribute
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 */), Pref="dom_fontface_enabled"] // TODO: Add support for FontFace in Workers.
interface FontFace {
constructor(CSSOMString family, (CSSOMString or BufferSource) source,
optional FontFaceDescriptors descriptors = {});
[SetterThrows]
attribute CSSOMString family;
[SetterThrows]
attribute CSSOMString style;
[SetterThrows]
attribute CSSOMString weight;
[SetterThrows, BindingAlias="stretch"]
attribute CSSOMString width;
[SetterThrows]
attribute CSSOMString unicodeRange;
[SetterThrows]
attribute CSSOMString featureSettings;
[SetterThrows]
attribute CSSOMString variationSettings;
[SetterThrows]
attribute CSSOMString display;
[SetterThrows]
attribute CSSOMString ascentOverride;
[SetterThrows]
attribute CSSOMString descentOverride;
[SetterThrows]
attribute CSSOMString lineGapOverride;
readonly attribute FontFaceLoadStatus status;
Promise<FontFace> load();
readonly attribute Promise<FontFace> loaded;
};