-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathCSSFontLoadingAPI.res
More file actions
103 lines (96 loc) · 2.77 KB
/
CSSFontLoadingAPI.res
File metadata and controls
103 lines (96 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
@@warning("-30")
open EventAPI
type fontDisplay =
| @as("auto") Auto
| @as("block") Block
| @as("fallback") Fallback
| @as("optional") Optional
| @as("swap") Swap
type fontFaceLoadStatus =
| @as("error") Error
| @as("loaded") Loaded
| @as("loading") Loading
| @as("unloaded") Unloaded
type fontFaceSetLoadStatus =
| @as("loaded") Loaded
| @as("loading") Loading
/**
[See FontFace on MDN](https://developer.mozilla.org/docs/Web/API/FontFace)
*/
@editor.completeFrom(FontFace)
type rec fontFace = {
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/family)
*/
mutable family: string,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/style)
*/
mutable style: string,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/weight)
*/
mutable weight: string,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/stretch)
*/
mutable stretch: string,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/unicodeRange)
*/
mutable unicodeRange: string,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/featureSettings)
*/
mutable featureSettings: string,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/display)
*/
mutable display: fontDisplay,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/ascentOverride)
*/
mutable ascentOverride: string,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/descentOverride)
*/
mutable descentOverride: string,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/lineGapOverride)
*/
mutable lineGapOverride: string,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/status)
*/
status: fontFaceLoadStatus,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/loaded)
*/
loaded: promise<fontFace>,
}
/**
[See FontFaceSet on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet)
*/
@editor.completeFrom(FontFaceSet)
type rec fontFaceSet = {
...eventTarget,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/ready)
*/
ready: promise<fontFaceSet>,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/status)
*/
status: fontFaceSetLoadStatus,
}
type fontFaceDescriptors = {
mutable style?: string,
mutable weight?: string,
mutable stretch?: string,
mutable unicodeRange?: string,
mutable featureSettings?: string,
mutable display?: fontDisplay,
mutable ascentOverride?: string,
mutable descentOverride?: string,
mutable lineGapOverride?: string,
}