Skip to main content

web_sys/features/
gen_FontFace.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "::js_sys::Object",
9        js_name = "FontFace",
10        typescript_type = "FontFace"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `FontFace` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
18    pub type FontFace;
19    #[wasm_bindgen(method, getter, js_class = "FontFace", js_name = "family")]
20    #[doc = "Getter for the `family` field of this object."]
21    #[doc = ""]
22    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/family)"]
23    #[doc = ""]
24    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
25    pub fn family(this: &FontFace) -> ::alloc::string::String;
26    #[wasm_bindgen(method, setter, js_class = "FontFace", js_name = "family")]
27    #[doc = "Setter for the `family` field of this object."]
28    #[doc = ""]
29    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/family)"]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
32    pub fn set_family(this: &FontFace, value: &str);
33    #[wasm_bindgen(method, getter, js_class = "FontFace", js_name = "style")]
34    #[doc = "Getter for the `style` field of this object."]
35    #[doc = ""]
36    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/style)"]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
39    pub fn style(this: &FontFace) -> ::alloc::string::String;
40    #[wasm_bindgen(method, setter, js_class = "FontFace", js_name = "style")]
41    #[doc = "Setter for the `style` field of this object."]
42    #[doc = ""]
43    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/style)"]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
46    pub fn set_style(this: &FontFace, value: &str);
47    #[wasm_bindgen(method, getter, js_class = "FontFace", js_name = "weight")]
48    #[doc = "Getter for the `weight` field of this object."]
49    #[doc = ""]
50    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/weight)"]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
53    pub fn weight(this: &FontFace) -> ::alloc::string::String;
54    #[wasm_bindgen(method, setter, js_class = "FontFace", js_name = "weight")]
55    #[doc = "Setter for the `weight` field of this object."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/weight)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
60    pub fn set_weight(this: &FontFace, value: &str);
61    #[wasm_bindgen(method, getter, js_class = "FontFace", js_name = "stretch")]
62    #[doc = "Getter for the `stretch` field of this object."]
63    #[doc = ""]
64    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/stretch)"]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
67    pub fn stretch(this: &FontFace) -> ::alloc::string::String;
68    #[wasm_bindgen(method, setter, js_class = "FontFace", js_name = "stretch")]
69    #[doc = "Setter for the `stretch` field of this object."]
70    #[doc = ""]
71    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/stretch)"]
72    #[doc = ""]
73    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
74    pub fn set_stretch(this: &FontFace, value: &str);
75    #[wasm_bindgen(method, getter, js_class = "FontFace", js_name = "unicodeRange")]
76    #[doc = "Getter for the `unicodeRange` field of this object."]
77    #[doc = ""]
78    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/unicodeRange)"]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
81    pub fn unicode_range(this: &FontFace) -> ::alloc::string::String;
82    #[wasm_bindgen(method, setter, js_class = "FontFace", js_name = "unicodeRange")]
83    #[doc = "Setter for the `unicodeRange` field of this object."]
84    #[doc = ""]
85    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/unicodeRange)"]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
88    pub fn set_unicode_range(this: &FontFace, value: &str);
89    #[wasm_bindgen(method, getter, js_class = "FontFace", js_name = "variant")]
90    #[doc = "Getter for the `variant` field of this object."]
91    #[doc = ""]
92    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/variant)"]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
95    pub fn variant(this: &FontFace) -> ::alloc::string::String;
96    #[wasm_bindgen(method, setter, js_class = "FontFace", js_name = "variant")]
97    #[doc = "Setter for the `variant` field of this object."]
98    #[doc = ""]
99    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/variant)"]
100    #[doc = ""]
101    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
102    pub fn set_variant(this: &FontFace, value: &str);
103    #[wasm_bindgen(method, getter, js_class = "FontFace", js_name = "featureSettings")]
104    #[doc = "Getter for the `featureSettings` field of this object."]
105    #[doc = ""]
106    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/featureSettings)"]
107    #[doc = ""]
108    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
109    pub fn feature_settings(this: &FontFace) -> ::alloc::string::String;
110    #[wasm_bindgen(method, setter, js_class = "FontFace", js_name = "featureSettings")]
111    #[doc = "Setter for the `featureSettings` field of this object."]
112    #[doc = ""]
113    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/featureSettings)"]
114    #[doc = ""]
115    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
116    pub fn set_feature_settings(this: &FontFace, value: &str);
117    #[wasm_bindgen(method, getter, js_class = "FontFace", js_name = "variationSettings")]
118    #[doc = "Getter for the `variationSettings` field of this object."]
119    #[doc = ""]
120    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/variationSettings)"]
121    #[doc = ""]
122    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
123    pub fn variation_settings(this: &FontFace) -> ::alloc::string::String;
124    #[wasm_bindgen(method, setter, js_class = "FontFace", js_name = "variationSettings")]
125    #[doc = "Setter for the `variationSettings` field of this object."]
126    #[doc = ""]
127    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/variationSettings)"]
128    #[doc = ""]
129    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
130    pub fn set_variation_settings(this: &FontFace, value: &str);
131    #[wasm_bindgen(method, getter, js_class = "FontFace", js_name = "display")]
132    #[doc = "Getter for the `display` field of this object."]
133    #[doc = ""]
134    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/display)"]
135    #[doc = ""]
136    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
137    pub fn display(this: &FontFace) -> ::alloc::string::String;
138    #[wasm_bindgen(method, setter, js_class = "FontFace", js_name = "display")]
139    #[doc = "Setter for the `display` field of this object."]
140    #[doc = ""]
141    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/display)"]
142    #[doc = ""]
143    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
144    pub fn set_display(this: &FontFace, value: &str);
145    #[cfg(feature = "FontFaceLoadStatus")]
146    #[wasm_bindgen(method, getter, js_class = "FontFace", js_name = "status")]
147    #[doc = "Getter for the `status` field of this object."]
148    #[doc = ""]
149    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/status)"]
150    #[doc = ""]
151    #[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceLoadStatus`*"]
152    pub fn status(this: &FontFace) -> FontFaceLoadStatus;
153    #[wasm_bindgen(catch, method, getter, js_class = "FontFace", js_name = "loaded")]
154    #[doc = "Getter for the `loaded` field of this object."]
155    #[doc = ""]
156    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/loaded)"]
157    #[doc = ""]
158    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
159    pub fn loaded(this: &FontFace) -> Result<::js_sys::Promise, JsValue>;
160    #[wasm_bindgen(catch, constructor, js_class = "FontFace")]
161    #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."]
162    #[doc = ""]
163    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"]
164    #[doc = ""]
165    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
166    pub fn new_with_str(family: &str, source: &str) -> Result<FontFace, JsValue>;
167    #[wasm_bindgen(catch, constructor, js_class = "FontFace")]
168    #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."]
169    #[doc = ""]
170    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"]
171    #[doc = ""]
172    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
173    pub fn new_with_array_buffer(
174        family: &str,
175        source: &::js_sys::ArrayBuffer,
176    ) -> Result<FontFace, JsValue>;
177    #[wasm_bindgen(catch, constructor, js_class = "FontFace")]
178    #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."]
179    #[doc = ""]
180    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"]
181    #[doc = ""]
182    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
183    pub fn new_with_array_buffer_view(
184        family: &str,
185        source: &::js_sys::Object,
186    ) -> Result<FontFace, JsValue>;
187    #[wasm_bindgen(catch, constructor, js_class = "FontFace")]
188    #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."]
189    #[doc = ""]
190    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"]
191    #[doc = ""]
192    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
193    pub fn new_with_u8_array(family: &str, source: &[u8]) -> Result<FontFace, JsValue>;
194    #[wasm_bindgen(catch, constructor, js_class = "FontFace")]
195    #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."]
196    #[doc = ""]
197    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"]
198    #[doc = ""]
199    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
200    pub fn new_with_js_u8_array(
201        family: &str,
202        source: &::js_sys::Uint8Array,
203    ) -> Result<FontFace, JsValue>;
204    #[cfg(feature = "FontFaceDescriptors")]
205    #[wasm_bindgen(catch, constructor, js_class = "FontFace")]
206    #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."]
207    #[doc = ""]
208    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"]
209    #[doc = ""]
210    #[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceDescriptors`*"]
211    pub fn new_with_str_and_descriptors(
212        family: &str,
213        source: &str,
214        descriptors: &FontFaceDescriptors,
215    ) -> Result<FontFace, JsValue>;
216    #[cfg(feature = "FontFaceDescriptors")]
217    #[wasm_bindgen(catch, constructor, js_class = "FontFace")]
218    #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."]
219    #[doc = ""]
220    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"]
221    #[doc = ""]
222    #[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceDescriptors`*"]
223    pub fn new_with_array_buffer_and_descriptors(
224        family: &str,
225        source: &::js_sys::ArrayBuffer,
226        descriptors: &FontFaceDescriptors,
227    ) -> Result<FontFace, JsValue>;
228    #[cfg(feature = "FontFaceDescriptors")]
229    #[wasm_bindgen(catch, constructor, js_class = "FontFace")]
230    #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."]
231    #[doc = ""]
232    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"]
233    #[doc = ""]
234    #[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceDescriptors`*"]
235    pub fn new_with_array_buffer_view_and_descriptors(
236        family: &str,
237        source: &::js_sys::Object,
238        descriptors: &FontFaceDescriptors,
239    ) -> Result<FontFace, JsValue>;
240    #[cfg(feature = "FontFaceDescriptors")]
241    #[wasm_bindgen(catch, constructor, js_class = "FontFace")]
242    #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."]
243    #[doc = ""]
244    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"]
245    #[doc = ""]
246    #[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceDescriptors`*"]
247    pub fn new_with_u8_array_and_descriptors(
248        family: &str,
249        source: &[u8],
250        descriptors: &FontFaceDescriptors,
251    ) -> Result<FontFace, JsValue>;
252    #[cfg(feature = "FontFaceDescriptors")]
253    #[wasm_bindgen(catch, constructor, js_class = "FontFace")]
254    #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."]
255    #[doc = ""]
256    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"]
257    #[doc = ""]
258    #[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceDescriptors`*"]
259    pub fn new_with_js_u8_array_and_descriptors(
260        family: &str,
261        source: &::js_sys::Uint8Array,
262        descriptors: &FontFaceDescriptors,
263    ) -> Result<FontFace, JsValue>;
264    #[wasm_bindgen(catch, method, js_class = "FontFace")]
265    #[doc = "The `load()` method."]
266    #[doc = ""]
267    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/load)"]
268    #[doc = ""]
269    #[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
270    pub fn load(this: &FontFace) -> Result<::js_sys::Promise, JsValue>;
271}