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