@react-x11/components 0.13.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/html/controls.d.ts +29 -2
- package/dist/html/controls.d.ts.map +1 -1
- package/dist/html/controls.js +70 -2
- package/dist/html/controls.js.map +1 -1
- package/dist/html/css/cascade.d.ts +42 -1
- package/dist/html/css/cascade.d.ts.map +1 -1
- package/dist/html/css/cascade.js +336 -16
- package/dist/html/css/cascade.js.map +1 -1
- package/dist/html/css/color.d.ts +18 -0
- package/dist/html/css/color.d.ts.map +1 -1
- package/dist/html/css/color.js +27 -0
- package/dist/html/css/color.js.map +1 -1
- package/dist/html/css/parse.d.ts +18 -4
- package/dist/html/css/parse.d.ts.map +1 -1
- package/dist/html/css/parse.js +66 -28
- package/dist/html/css/parse.js.map +1 -1
- package/dist/html/css/shapes.d.ts +44 -0
- package/dist/html/css/shapes.d.ts.map +1 -0
- package/dist/html/css/shapes.js +194 -0
- package/dist/html/css/shapes.js.map +1 -0
- package/dist/html/css/style.d.ts +128 -15
- package/dist/html/css/style.d.ts.map +1 -1
- package/dist/html/css/style.js +547 -144
- package/dist/html/css/style.js.map +1 -1
- package/dist/html/css/transform.d.ts +85 -0
- package/dist/html/css/transform.d.ts.map +1 -0
- package/dist/html/css/transform.js +425 -0
- package/dist/html/css/transform.js.map +1 -0
- package/dist/html/css/ua.d.ts.map +1 -1
- package/dist/html/css/ua.js +14 -2
- package/dist/html/css/ua.js.map +1 -1
- package/dist/html/css/values.d.ts +4 -0
- package/dist/html/css/values.d.ts.map +1 -1
- package/dist/html/css/values.js.map +1 -1
- package/dist/html/fonts.d.ts +55 -5
- package/dist/html/fonts.d.ts.map +1 -1
- package/dist/html/fonts.js +284 -23
- package/dist/html/fonts.js.map +1 -1
- package/dist/html/layout/axes.d.ts +14 -0
- package/dist/html/layout/axes.d.ts.map +1 -0
- package/dist/html/layout/axes.js +28 -0
- package/dist/html/layout/axes.js.map +1 -0
- package/dist/html/layout/block.d.ts +104 -12
- package/dist/html/layout/block.d.ts.map +1 -1
- package/dist/html/layout/block.js +410 -39
- package/dist/html/layout/block.js.map +1 -1
- package/dist/html/layout/boxes.d.ts +72 -1
- package/dist/html/layout/boxes.d.ts.map +1 -1
- package/dist/html/layout/boxes.js +40 -2
- package/dist/html/layout/boxes.js.map +1 -1
- package/dist/html/layout/cache.d.ts +1 -1
- package/dist/html/layout/cache.d.ts.map +1 -1
- package/dist/html/layout/cache.js +6 -0
- package/dist/html/layout/cache.js.map +1 -1
- package/dist/html/layout/css-grid.d.ts.map +1 -1
- package/dist/html/layout/css-grid.js +144 -24
- package/dist/html/layout/css-grid.js.map +1 -1
- package/dist/html/layout/flex.d.ts.map +1 -1
- package/dist/html/layout/flex.js +585 -85
- package/dist/html/layout/flex.js.map +1 -1
- package/dist/html/layout/inline.d.ts +3 -0
- package/dist/html/layout/inline.d.ts.map +1 -1
- package/dist/html/layout/inline.js +144 -54
- package/dist/html/layout/inline.js.map +1 -1
- package/dist/html/layout/multicol.d.ts +42 -0
- package/dist/html/layout/multicol.d.ts.map +1 -0
- package/dist/html/layout/multicol.js +897 -0
- package/dist/html/layout/multicol.js.map +1 -0
- package/dist/html/layout/shaping.d.ts +7 -0
- package/dist/html/layout/shaping.d.ts.map +1 -1
- package/dist/html/layout/shaping.js +25 -20
- package/dist/html/layout/shaping.js.map +1 -1
- package/dist/html/layout/table.d.ts.map +1 -1
- package/dist/html/layout/table.js +97 -31
- package/dist/html/layout/table.js.map +1 -1
- package/dist/html/node.d.ts +4 -0
- package/dist/html/node.d.ts.map +1 -1
- package/dist/html/node.js +319 -47
- package/dist/html/node.js.map +1 -1
- package/dist/html/paint.d.ts +83 -5
- package/dist/html/paint.d.ts.map +1 -1
- package/dist/html/paint.js +1474 -217
- package/dist/html/paint.js.map +1 -1
- package/dist/html/svg.d.ts +39 -9
- package/dist/html/svg.d.ts.map +1 -1
- package/dist/html/svg.js +482 -37
- package/dist/html/svg.js.map +1 -1
- package/dist/html/widgets.js +87 -7
- package/dist/html/widgets.js.map +1 -1
- package/dist/html/woff2.d.ts +14 -0
- package/dist/html/woff2.d.ts.map +1 -0
- package/dist/html/woff2.js +608 -0
- package/dist/html/woff2.js.map +1 -0
- package/dist/maps/controller.d.ts +17 -1
- package/dist/maps/controller.d.ts.map +1 -1
- package/dist/maps/controller.js +27 -7
- package/dist/maps/controller.js.map +1 -1
- package/dist/richtext/node.d.ts +8 -1
- package/dist/richtext/node.d.ts.map +1 -1
- package/dist/richtext/node.js +5 -1
- package/dist/richtext/node.js.map +1 -1
- package/dist/richtext/runs.d.ts +25 -6
- package/dist/richtext/runs.d.ts.map +1 -1
- package/dist/richtext/runs.js +240 -24
- package/dist/richtext/runs.js.map +1 -1
- package/package.json +1 -1
- package/src/html/controls.ts +85 -2
- package/src/html/css/cascade.ts +366 -8
- package/src/html/css/color.ts +29 -0
- package/src/html/css/parse.ts +71 -31
- package/src/html/css/shapes.ts +239 -0
- package/src/html/css/style.ts +652 -147
- package/src/html/css/transform.ts +459 -0
- package/src/html/css/ua.ts +15 -2
- package/src/html/css/values.ts +4 -0
- package/src/html/fonts.ts +312 -29
- package/src/html/layout/axes.ts +62 -0
- package/src/html/layout/block.ts +466 -37
- package/src/html/layout/boxes.ts +95 -3
- package/src/html/layout/cache.ts +6 -0
- package/src/html/layout/css-grid.ts +169 -32
- package/src/html/layout/flex.ts +686 -79
- package/src/html/layout/inline.ts +149 -55
- package/src/html/layout/multicol.ts +977 -0
- package/src/html/layout/shaping.ts +27 -18
- package/src/html/layout/table.ts +105 -35
- package/src/html/node.ts +354 -48
- package/src/html/paint.ts +1804 -315
- package/src/html/svg.ts +573 -36
- package/src/html/widgets.ts +95 -9
- package/src/html/woff2.ts +612 -0
- package/src/maps/controller.ts +28 -7
- package/src/richtext/node.ts +13 -2
- package/src/richtext/runs.ts +313 -35
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"values.js","sourceRoot":"","sources":["../../../src/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CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACzE,CAAC;IACH,CAAC;AACH,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,eAAe,CAC7B,KAAa,EACb,UAAkB,EAClB,QAAgB;IAEhB,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC;QACnC,KAAK,UAAU;YACb,OAAO,QAAQ,GAAG,MAAM,CAAC;QAC3B,KAAK,SAAS;YACZ,OAAO,QAAQ,GAAG,KAAK,CAAC;QAC1B,KAAK,OAAO;YACV,OAAO,QAAQ,GAAG,MAAM,CAAC;QAC3B,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;QAClB,KAAK,OAAO;YACV,OAAO,QAAQ,GAAG,KAAK,CAAC;QAC1B,KAAK,SAAS;YACZ,OAAO,QAAQ,GAAG,GAAG,CAAC;QACxB,KAAK,UAAU;YACb,OAAO,QAAQ,GAAG,CAAC,CAAC;QACtB,KAAK,SAAS;YACZ,OAAO,UAAU,GAAG,GAAG,CAAC;QAC1B,KAAK,QAAQ;YACX,OAAO,UAAU,GAAG,GAAG,CAAC;QAC1B;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC"}
|
package/dist/html/fonts.d.ts
CHANGED
|
@@ -34,6 +34,14 @@ export declare class WebFonts implements FontFamilies {
|
|
|
34
34
|
* lists that come to one string share an entry, which can ask for a face
|
|
35
35
|
* a little early; never for one nothing wants. */
|
|
36
36
|
private _sources;
|
|
37
|
+
/** The groups by the names they are registered under, which is how a
|
|
38
|
+
* list the engine is handed names one (`wght`). */
|
|
39
|
+
private _groups;
|
|
40
|
+
/** Lists → weight and slant → the axis value text in them is set at. */
|
|
41
|
+
private _axes;
|
|
42
|
+
/** Whether any loaded face has a weight axis to set; null for not yet
|
|
43
|
+
* asked since the faces changed. */
|
|
44
|
+
private _variable;
|
|
37
45
|
/** The document's characters, as the last `request` saw them. */
|
|
38
46
|
private _text;
|
|
39
47
|
private _seen;
|
|
@@ -52,6 +60,29 @@ export declare class WebFonts implements FontFamilies {
|
|
|
52
60
|
setFaces(declared: DeclaredFace[]): void;
|
|
53
61
|
map(list: string): string;
|
|
54
62
|
note(style: ComputedStyle): void;
|
|
63
|
+
/** Whether any face the document has loaded is a variable font whose rule
|
|
64
|
+
* declares a range of weights: whether `wght` has anything to say. */
|
|
65
|
+
get variable(): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Where on its weight axis text in a family list — one `map` made — is
|
|
68
|
+
* set at a weight and slant, or null where no axis is this document's to
|
|
69
|
+
* set.
|
|
70
|
+
*
|
|
71
|
+
* CSS has the weight a style asks for applied to a variable face's `wght`
|
|
72
|
+
* axis, clamped to the range its `@font-face` rule declares (CSS Fonts 4,
|
|
73
|
+
* 7.2): `font-weight: 100 900` is every weight the file has, and
|
|
74
|
+
* under `font-weight: 400 700` text at 900 is set at 700. The rule is the
|
|
75
|
+
* document's, so the value is said here and handed to the engine with the
|
|
76
|
+
* run (`layout/axes.ts`). An engine left to itself either moves the axis
|
|
77
|
+
* to the style's weight, past what the rule declared — ntk — or not at
|
|
78
|
+
* all: a face react-x11 registers with CoreText is drawn at its file's
|
|
79
|
+
* default, and every weight of Geist on macOS was the regular.
|
|
80
|
+
*
|
|
81
|
+
* Only the list's first family is asked, the one text is set in, and only
|
|
82
|
+
* a face whose rule declares a range: one declared at a single weight is
|
|
83
|
+
* left as the engine sets it.
|
|
84
|
+
*/
|
|
85
|
+
wght(list: string, weight: number, italic: boolean): WeightAxis | null;
|
|
55
86
|
/**
|
|
56
87
|
* Ask for the faces the styles noted since the last call want, for the
|
|
57
88
|
* characters `text` holds — the document's own. True when the lists the
|
|
@@ -83,17 +114,36 @@ export declare class WebFonts implements FontFamilies {
|
|
|
83
114
|
/** Load a face, trying its sources in order: registered before this
|
|
84
115
|
* returned, waiting on the host, or failed with nothing left to try. */
|
|
85
116
|
private _load;
|
|
86
|
-
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
117
|
+
/**
|
|
118
|
+
* Register a face's bytes under its group's name. False when the host
|
|
119
|
+
* declined, or the font manager could not read them — a file that is not
|
|
120
|
+
* a font — or read them and cannot set text in them (`refusal`), and the
|
|
121
|
+
* next source is tried.
|
|
122
|
+
*
|
|
123
|
+
* A WOFF2 the engine does not take as served is handed over again as the
|
|
124
|
+
* font inside it (`woff2.ts`), and the answer is then a promise: CoreText
|
|
125
|
+
* reads no such container, so react-x11's `loadFont` refuses every one on
|
|
126
|
+
* macOS, and an ntk whose fontkit cuts no instance out of one cuts it out
|
|
127
|
+
* of the sfnt. Nothing here asks which engine it is: the file is offered
|
|
128
|
+
* as the web served it, and rebuilt only for an engine that said no.
|
|
129
|
+
*/
|
|
91
130
|
private _register;
|
|
131
|
+
/** Hand a font file to the font manager, under a face's group's name.
|
|
132
|
+
* Null when it registered; otherwise why the engine cannot set text in
|
|
133
|
+
* it (`refusal`), or `''` for bytes it could not read at all. */
|
|
134
|
+
private _set;
|
|
135
|
+
/** A source did not register, and the one the engine refused is said. */
|
|
136
|
+
private _declined;
|
|
92
137
|
/** A face arrived, or will not. Either way the boxes are built again: an
|
|
93
138
|
* arrival changes the lists, and a failure has the next face asked for,
|
|
94
139
|
* by a family that has to be asked again to ask it. */
|
|
95
140
|
private _settled;
|
|
96
141
|
}
|
|
142
|
+
/** A point on the weight axis, as an engine takes one with a run: its
|
|
143
|
+
* `variations`. */
|
|
144
|
+
export interface WeightAxis {
|
|
145
|
+
wght: number;
|
|
146
|
+
}
|
|
97
147
|
/** The slice of an opened face `refusal` reads: react-x11's `Font`. */
|
|
98
148
|
interface OpenedFace {
|
|
99
149
|
variationAxes?: Record<string, {
|
package/dist/html/fonts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/html/fonts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","s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uE;AACvE,UAAU,UAAU;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9E,SAAS,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;CACvD;AAQD;;;;;;;;;;;;GAYG;AACH,wBAAgB,OAAO,CACrB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,GACb,MAAM,GAAG,IAAI,CAmBf;AAqHD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,EACvD,KAAK,EAAE,CAAC,EAAE,EACV,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,GACd,CAAC,GAAG,IAAI,CAaV"}
|
package/dist/html/fonts.js
CHANGED
|
@@ -47,18 +47,57 @@
|
|
|
47
47
|
// none left the family stays out of the list and the text is set in the
|
|
48
48
|
// next one, as a browser sets it when it cannot use a font.
|
|
49
49
|
//
|
|
50
|
+
// **A WOFF2 an engine does not take is handed over as the font inside it.**
|
|
51
|
+
// The web serves a font as WOFF2 and as little else, and not every engine
|
|
52
|
+
// reads one: CoreText reads an sfnt and nothing more, so react-x11's
|
|
53
|
+
// `loadFont` throws for a WOFF2 on macOS, and the fontkit ntk cuts a
|
|
54
|
+
// variable face with cut nothing out of one. Either way the page was set in
|
|
55
|
+
// its fallback — nextjs.org in Arial, the family its `local()` names, where
|
|
56
|
+
// a browser sets it in Geist. So a file is offered as it was served, and
|
|
57
|
+
// where that is refused the sfnt it wraps is rebuilt (`woff2.ts`) and
|
|
58
|
+
// offered in its place (`_register`); only a font refused both ways is a
|
|
59
|
+
// source that did not load. Nothing asks which engine it is.
|
|
60
|
+
//
|
|
61
|
+
// **A variable face is set at the weight its rule has for a style's.** The
|
|
62
|
+
// weight a style asks for is a place on the face's `wght` axis, clamped to
|
|
63
|
+
// the range its `@font-face` declares (CSS Fonts 4, 7.2), and the rule is
|
|
64
|
+
// the document's: the value is said here (`wght`) and handed to the engine
|
|
65
|
+
// with the run (`layout/axes.ts`). Left alone, ntk moves the axis to the
|
|
66
|
+
// style's weight whatever the rule declared, and CoreText, for a face
|
|
67
|
+
// react-x11 registered, does not move it — every weight of Geist was its
|
|
68
|
+
// regular on macOS.
|
|
69
|
+
//
|
|
50
70
|
// A family split by `unicode-range` is registered a name per range, since the
|
|
51
71
|
// font manager picks among one name's faces by weight and slant alone, and
|
|
52
72
|
// the range that holds the most of the document's characters goes first: the
|
|
53
73
|
// first family is the one a run is set in, and the others are reached through
|
|
54
74
|
// the fallback for the characters it lacks.
|
|
55
75
|
//
|
|
76
|
+
// **A family the document declares is never the system's by that name.**
|
|
77
|
+
// CSS Fonts 4 (5.2) has a family defined by `@font-face` with no face
|
|
78
|
+
// present treated as missing, and forbids matching a platform font of the
|
|
79
|
+
// same name. That holds for a family whose sources are all `local()`s too,
|
|
80
|
+
// which is the one that used to get past: next/font declares
|
|
81
|
+
// `"GeistSans Fallback"` as `src: local("Arial")`, the rule was dropped for
|
|
82
|
+
// having no `url()`, and the name went to the text engine as written —
|
|
83
|
+
// where fontconfig's nearest guess for a family nobody has was Hiragino Sans
|
|
84
|
+
// at 400 and Gill Sans Ultra Bold at 450.
|
|
85
|
+
//
|
|
86
|
+
// A `local()` is a source like a `url()`, tried in the order `src` lists
|
|
87
|
+
// them, and what it comes to is **an alias**: a face the system has goes
|
|
88
|
+
// into the list as its family's name (`localFamily`), in the place of the
|
|
89
|
+
// document's, and nothing is registered. A font manager has no lookup by a
|
|
90
|
+
// face's name — it answers any family with its best guess — so the question
|
|
91
|
+
// is put as a match, and the answer is believed only when the face that
|
|
92
|
+
// comes back says it is the one named.
|
|
93
|
+
//
|
|
56
94
|
// What stays the application's: registering a face adds it to ntk's
|
|
57
95
|
// fallback chain, where it can supply a glyph no other face has to text
|
|
58
96
|
// anywhere in the app (react-x11's `loadFont` says so), and nothing is ever
|
|
59
97
|
// unregistered — the font manager has no way to. A session that visits many
|
|
60
98
|
// sites keeps their faces, one registration per distinct declaration.
|
|
61
99
|
import { loadFont, openFont } from 'react-x11';
|
|
100
|
+
import { isWoff2, sfntFromWoff2 } from './woff2.js';
|
|
62
101
|
/** The formats a font manager reads. A source hinted as anything else — an
|
|
63
102
|
* `embedded-opentype` for old Internet Explorer, an `svg` font — is not
|
|
64
103
|
* asked for; one with no hint is. */
|
|
@@ -83,6 +122,8 @@ function registryOf(app) {
|
|
|
83
122
|
next: 0,
|
|
84
123
|
names: new Map(),
|
|
85
124
|
ready: new Set(),
|
|
125
|
+
locals: new Map(),
|
|
126
|
+
axes: new Map(),
|
|
86
127
|
pending: new Map(),
|
|
87
128
|
warned: false,
|
|
88
129
|
};
|
|
@@ -117,6 +158,14 @@ export class WebFonts {
|
|
|
117
158
|
* lists that come to one string share an entry, which can ask for a face
|
|
118
159
|
* a little early; never for one nothing wants. */
|
|
119
160
|
_sources = new Map();
|
|
161
|
+
/** The groups by the names they are registered under, which is how a
|
|
162
|
+
* list the engine is handed names one (`wght`). */
|
|
163
|
+
_groups = new Map();
|
|
164
|
+
/** Lists → weight and slant → the axis value text in them is set at. */
|
|
165
|
+
_axes = new Map();
|
|
166
|
+
/** Whether any loaded face has a weight axis to set; null for not yet
|
|
167
|
+
* asked since the faces changed. */
|
|
168
|
+
_variable = null;
|
|
120
169
|
/** The document's characters, as the last `request` saw them. */
|
|
121
170
|
_text = null;
|
|
122
171
|
_seen = new Set();
|
|
@@ -196,14 +245,17 @@ export class WebFonts {
|
|
|
196
245
|
order: order++,
|
|
197
246
|
};
|
|
198
247
|
for (const m of members) {
|
|
199
|
-
const ready = registry?.ready.has(faceKey(name, m.rule)) ?? false;
|
|
200
248
|
const face = {
|
|
201
249
|
rule: m.rule,
|
|
202
250
|
element: m.element,
|
|
203
251
|
group,
|
|
204
252
|
family,
|
|
205
|
-
state:
|
|
253
|
+
state: 'idle',
|
|
254
|
+
local: null,
|
|
255
|
+
wght: null,
|
|
206
256
|
};
|
|
257
|
+
if (registry?.ready.has(faceKey(name, m.rule)))
|
|
258
|
+
arrive(face, registry);
|
|
207
259
|
group.faces.push(face);
|
|
208
260
|
made.set(m, face);
|
|
209
261
|
}
|
|
@@ -212,6 +264,11 @@ export class WebFonts {
|
|
|
212
264
|
families.set(key, family);
|
|
213
265
|
}
|
|
214
266
|
this._families = families;
|
|
267
|
+
this._groups.clear();
|
|
268
|
+
for (const family of families.values()) {
|
|
269
|
+
for (const group of family.groups)
|
|
270
|
+
this._groups.set(group.name, group);
|
|
271
|
+
}
|
|
215
272
|
this._faces = declared.map((d) => made.get(d));
|
|
216
273
|
// the ranges are new, and so is what they cover
|
|
217
274
|
if (this._text !== null)
|
|
@@ -237,8 +294,16 @@ export class WebFonts {
|
|
|
237
294
|
}
|
|
238
295
|
used.push(family);
|
|
239
296
|
for (const group of orderedGroups(family)) {
|
|
240
|
-
|
|
297
|
+
// the name its files are registered under, then the families its
|
|
298
|
+
// `local()`s came to
|
|
299
|
+
const ready = group.faces.filter((f) => f.state === 'ready');
|
|
300
|
+
if (ready.some((f) => f.local === null))
|
|
241
301
|
out.push(group.name);
|
|
302
|
+
for (const face of ready) {
|
|
303
|
+
if (face.local !== null && !out.includes(face.local)) {
|
|
304
|
+
out.push(face.local);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
242
307
|
}
|
|
243
308
|
}
|
|
244
309
|
let mapped = out.length ? out.join(', ') : this._fallback;
|
|
@@ -272,6 +337,62 @@ export class WebFonts {
|
|
|
272
337
|
for (const family of families)
|
|
273
338
|
family.wants.add(want);
|
|
274
339
|
}
|
|
340
|
+
/** Whether any face the document has loaded is a variable font whose rule
|
|
341
|
+
* declares a range of weights: whether `wght` has anything to say. */
|
|
342
|
+
get variable() {
|
|
343
|
+
if (this._variable === null) {
|
|
344
|
+
this._variable = false;
|
|
345
|
+
for (const group of this._groups.values()) {
|
|
346
|
+
if (group.faces.some((f) => ranged(f) !== null))
|
|
347
|
+
this._variable = true;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return this._variable;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Where on its weight axis text in a family list — one `map` made — is
|
|
354
|
+
* set at a weight and slant, or null where no axis is this document's to
|
|
355
|
+
* set.
|
|
356
|
+
*
|
|
357
|
+
* CSS has the weight a style asks for applied to a variable face's `wght`
|
|
358
|
+
* axis, clamped to the range its `@font-face` rule declares (CSS Fonts 4,
|
|
359
|
+
* 7.2): `font-weight: 100 900` is every weight the file has, and
|
|
360
|
+
* under `font-weight: 400 700` text at 900 is set at 700. The rule is the
|
|
361
|
+
* document's, so the value is said here and handed to the engine with the
|
|
362
|
+
* run (`layout/axes.ts`). An engine left to itself either moves the axis
|
|
363
|
+
* to the style's weight, past what the rule declared — ntk — or not at
|
|
364
|
+
* all: a face react-x11 registers with CoreText is drawn at its file's
|
|
365
|
+
* default, and every weight of Geist on macOS was the regular.
|
|
366
|
+
*
|
|
367
|
+
* Only the list's first family is asked, the one text is set in, and only
|
|
368
|
+
* a face whose rule declares a range: one declared at a single weight is
|
|
369
|
+
* left as the engine sets it.
|
|
370
|
+
*/
|
|
371
|
+
wght(list, weight, italic) {
|
|
372
|
+
if (!this.variable)
|
|
373
|
+
return null;
|
|
374
|
+
let byFace = this._axes.get(list);
|
|
375
|
+
if (!byFace)
|
|
376
|
+
this._axes.set(list, (byFace = new Map()));
|
|
377
|
+
const key = italic ? -weight : weight;
|
|
378
|
+
let axis = byFace.get(key);
|
|
379
|
+
if (axis === undefined) {
|
|
380
|
+
axis = null;
|
|
381
|
+
const comma = list.indexOf(',');
|
|
382
|
+
const first = (comma < 0 ? list : list.slice(0, comma)).trim();
|
|
383
|
+
const face = bestFace(
|
|
384
|
+
// the faces registered under the name, which the engine picks among
|
|
385
|
+
this._groups
|
|
386
|
+
.get(first)
|
|
387
|
+
?.faces.filter((f) => f.state === 'ready' && f.local === null) ?? [], weight, italic);
|
|
388
|
+
const range = face && ranged(face);
|
|
389
|
+
if (range) {
|
|
390
|
+
axis = weightAxis(Math.max(range[0], Math.min(weight, range[1])));
|
|
391
|
+
}
|
|
392
|
+
byFace.set(key, axis);
|
|
393
|
+
}
|
|
394
|
+
return axis;
|
|
395
|
+
}
|
|
275
396
|
/**
|
|
276
397
|
* Ask for the faces the styles noted since the last call want, for the
|
|
277
398
|
* characters `text` holds — the document's own. True when the lists the
|
|
@@ -305,6 +426,7 @@ export class WebFonts {
|
|
|
305
426
|
destroy() {
|
|
306
427
|
this._destroyed = true;
|
|
307
428
|
this._families.clear();
|
|
429
|
+
this._groups.clear();
|
|
308
430
|
this._forget();
|
|
309
431
|
}
|
|
310
432
|
/** Every list mapped before this is stale: a face arrived, or the faces
|
|
@@ -312,6 +434,8 @@ export class WebFonts {
|
|
|
312
434
|
_forget() {
|
|
313
435
|
this._memo.clear();
|
|
314
436
|
this._sources.clear();
|
|
437
|
+
this._axes.clear();
|
|
438
|
+
this._variable = null;
|
|
315
439
|
}
|
|
316
440
|
/**
|
|
317
441
|
* Load the face in a group that best matches a weight and slant, passing
|
|
@@ -400,7 +524,7 @@ export class WebFonts {
|
|
|
400
524
|
const registry = registryOf(app);
|
|
401
525
|
const key = faceKey(face.group.name, face.rule);
|
|
402
526
|
if (registry.ready.has(key)) {
|
|
403
|
-
face
|
|
527
|
+
arrive(face, registry);
|
|
404
528
|
return 'ready';
|
|
405
529
|
}
|
|
406
530
|
face.state = 'loading';
|
|
@@ -417,7 +541,7 @@ export class WebFonts {
|
|
|
417
541
|
registry.ready.add(key);
|
|
418
542
|
settle(ok);
|
|
419
543
|
};
|
|
420
|
-
const sources = face.rule.sources.filter((s) => s.format === null || READABLE.has(s.format));
|
|
544
|
+
const sources = face.rule.sources.filter((s) => 'local' in s || s.format === null || READABLE.has(s.format));
|
|
421
545
|
let i = 0;
|
|
422
546
|
let sync = true;
|
|
423
547
|
/** Ask for the next source. `'ready'` registered it, `'waiting'` is
|
|
@@ -425,6 +549,21 @@ export class WebFonts {
|
|
|
425
549
|
const next = () => {
|
|
426
550
|
while (i < sources.length) {
|
|
427
551
|
const source = sources[i++];
|
|
552
|
+
if ('local' in source) {
|
|
553
|
+
// nothing to ask the host for, and nothing to wait on
|
|
554
|
+
const family = this._destroyed
|
|
555
|
+
? null
|
|
556
|
+
: localFamily(app, source.local, face.rule);
|
|
557
|
+
if (family === null)
|
|
558
|
+
continue;
|
|
559
|
+
registry.locals.set(key, family);
|
|
560
|
+
finish(true);
|
|
561
|
+
if (sync)
|
|
562
|
+
arrive(face, registry);
|
|
563
|
+
else
|
|
564
|
+
this._settled(face, true);
|
|
565
|
+
return 'ready';
|
|
566
|
+
}
|
|
428
567
|
let answer;
|
|
429
568
|
try {
|
|
430
569
|
answer = this._ask({
|
|
@@ -437,13 +576,21 @@ export class WebFonts {
|
|
|
437
576
|
continue;
|
|
438
577
|
}
|
|
439
578
|
if (isPromise(answer)) {
|
|
440
|
-
answer
|
|
579
|
+
answer
|
|
580
|
+
.then((result) => this._register(face, result, source.url))
|
|
581
|
+
.then(after, () => after(false));
|
|
582
|
+
return 'waiting';
|
|
583
|
+
}
|
|
584
|
+
const registered = this._register(face, answer, source.url);
|
|
585
|
+
if (isPromise(registered)) {
|
|
586
|
+
// a WOFF2 being handed over as the font inside it
|
|
587
|
+
registered.then(after, () => after(false));
|
|
441
588
|
return 'waiting';
|
|
442
589
|
}
|
|
443
|
-
if (
|
|
590
|
+
if (registered) {
|
|
444
591
|
finish(true);
|
|
445
592
|
if (sync)
|
|
446
|
-
face
|
|
593
|
+
arrive(face, registry);
|
|
447
594
|
else
|
|
448
595
|
this._settled(face, true);
|
|
449
596
|
return 'ready';
|
|
@@ -470,24 +617,47 @@ export class WebFonts {
|
|
|
470
617
|
}
|
|
471
618
|
return outcome === 'ready' ? 'ready' : 'loading';
|
|
472
619
|
}
|
|
473
|
-
/**
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
*
|
|
477
|
-
*
|
|
620
|
+
/**
|
|
621
|
+
* Register a face's bytes under its group's name. False when the host
|
|
622
|
+
* declined, or the font manager could not read them — a file that is not
|
|
623
|
+
* a font — or read them and cannot set text in them (`refusal`), and the
|
|
624
|
+
* next source is tried.
|
|
625
|
+
*
|
|
626
|
+
* A WOFF2 the engine does not take as served is handed over again as the
|
|
627
|
+
* font inside it (`woff2.ts`), and the answer is then a promise: CoreText
|
|
628
|
+
* reads no such container, so react-x11's `loadFont` refuses every one on
|
|
629
|
+
* macOS, and an ntk whose fontkit cuts no instance out of one cuts it out
|
|
630
|
+
* of the sfnt. Nothing here asks which engine it is: the file is offered
|
|
631
|
+
* as the web served it, and rebuilt only for an engine that said no.
|
|
632
|
+
*/
|
|
478
633
|
_register(face, result, url) {
|
|
479
634
|
if (this._destroyed || !this._app || result?.kind !== 'font')
|
|
480
635
|
return false;
|
|
636
|
+
const refused = this._set(face, result.bytes);
|
|
637
|
+
if (refused === null)
|
|
638
|
+
return true;
|
|
639
|
+
if (!isWoff2(result.bytes))
|
|
640
|
+
return this._declined(url, refused);
|
|
641
|
+
return sfntFromWoff2(result.bytes).then((sfnt) => {
|
|
642
|
+
if (this._destroyed || !this._app)
|
|
643
|
+
return false;
|
|
644
|
+
const still = sfnt ? this._set(face, sfnt) : refused;
|
|
645
|
+
return still === null || this._declined(url, still);
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
/** Hand a font file to the font manager, under a face's group's name.
|
|
649
|
+
* Null when it registered; otherwise why the engine cannot set text in
|
|
650
|
+
* it (`refusal`), or `''` for bytes it could not read at all. */
|
|
651
|
+
_set(face, bytes) {
|
|
481
652
|
const { weight, style } = face.rule;
|
|
482
653
|
const app = this._app;
|
|
483
654
|
try {
|
|
484
655
|
// `loadFont` opens the file first too, and finds this one opened
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
return
|
|
489
|
-
|
|
490
|
-
loadFont(app, result.bytes, {
|
|
656
|
+
const opened = openFont(app, bytes);
|
|
657
|
+
const refused = refusal(app, opened, this._fallback);
|
|
658
|
+
if (refused !== null)
|
|
659
|
+
return refused;
|
|
660
|
+
loadFont(app, bytes, {
|
|
491
661
|
family: face.group.name,
|
|
492
662
|
// a range is registered at the weight nearest regular in it: the
|
|
493
663
|
// font manager picks among a group's faces by distance from one
|
|
@@ -495,25 +665,69 @@ export class WebFonts {
|
|
|
495
665
|
weight: Math.max(weight[0], Math.min(400, weight[1])),
|
|
496
666
|
style,
|
|
497
667
|
});
|
|
498
|
-
|
|
668
|
+
const axis = opened.variationAxes?.wght;
|
|
669
|
+
if (axis && axis.min < axis.max) {
|
|
670
|
+
const key = faceKey(face.group.name, face.rule);
|
|
671
|
+
registryOf(this._app).axes.set(key, [axis.min, axis.max]);
|
|
672
|
+
}
|
|
673
|
+
return null;
|
|
499
674
|
}
|
|
500
675
|
catch {
|
|
501
|
-
return
|
|
676
|
+
return '';
|
|
502
677
|
}
|
|
503
678
|
}
|
|
679
|
+
/** A source did not register, and the one the engine refused is said. */
|
|
680
|
+
_declined(url, why) {
|
|
681
|
+
if (why && this._app)
|
|
682
|
+
warnRefused(registryOf(this._app), url, why);
|
|
683
|
+
return false;
|
|
684
|
+
}
|
|
504
685
|
/** A face arrived, or will not. Either way the boxes are built again: an
|
|
505
686
|
* arrival changes the lists, and a failure has the next face asked for,
|
|
506
687
|
* by a family that has to be asked again to ask it. */
|
|
507
688
|
_settled(face, ok) {
|
|
508
689
|
if (this._destroyed)
|
|
509
690
|
return;
|
|
510
|
-
|
|
691
|
+
if (ok && this._app)
|
|
692
|
+
arrive(face, registryOf(this._app));
|
|
693
|
+
else
|
|
694
|
+
face.state = ok ? 'ready' : 'failed';
|
|
511
695
|
if (!ok)
|
|
512
696
|
face.family.asked.clear();
|
|
513
697
|
this._forget();
|
|
514
698
|
this._changed();
|
|
515
699
|
}
|
|
516
700
|
}
|
|
701
|
+
/** A registered face is the document's to use: what the connection knows
|
|
702
|
+
* of it — the family a `local()` came to, the axis its file has — is the
|
|
703
|
+
* face's. */
|
|
704
|
+
function arrive(face, registry) {
|
|
705
|
+
const key = faceKey(face.group.name, face.rule);
|
|
706
|
+
face.state = 'ready';
|
|
707
|
+
face.local = registry.locals.get(key) ?? null;
|
|
708
|
+
face.wght = registry.axes.get(key) ?? null;
|
|
709
|
+
}
|
|
710
|
+
/** One object a value: ntk tells two runs' variations apart by identity,
|
|
711
|
+
* and would set two runs at one weight as two. */
|
|
712
|
+
const WEIGHTS = new Map();
|
|
713
|
+
function weightAxis(wght) {
|
|
714
|
+
let axis = WEIGHTS.get(wght);
|
|
715
|
+
if (!axis)
|
|
716
|
+
WEIGHTS.set(wght, (axis = { wght }));
|
|
717
|
+
return axis;
|
|
718
|
+
}
|
|
719
|
+
/** The weights a loaded face's axis is set within: the range its rule
|
|
720
|
+
* declares, inside the one its file has. Null for a face with no axis, or
|
|
721
|
+
* declared at a single weight. */
|
|
722
|
+
function ranged(face) {
|
|
723
|
+
if (face.state !== 'ready' || !face.wght)
|
|
724
|
+
return null;
|
|
725
|
+
const lo = Math.max(face.rule.weight[0], face.wght[0]);
|
|
726
|
+
const hi = Math.min(face.rule.weight[1], face.wght[1]);
|
|
727
|
+
return face.rule.weight[0] < face.rule.weight[1] && lo <= hi
|
|
728
|
+
? [lo, hi]
|
|
729
|
+
: null;
|
|
730
|
+
}
|
|
517
731
|
/** The axes a style moves without naming one: ntk sets `wght` from the
|
|
518
732
|
* weight and `opsz` from the size (its `docs/fonts.md`), and nothing here
|
|
519
733
|
* hands it a `font-variation-settings`. A face with neither is set as its
|
|
@@ -592,7 +806,54 @@ function faceKey(name, rule) {
|
|
|
592
806
|
}
|
|
593
807
|
function faceSignature(rule) {
|
|
594
808
|
const range = rangeKey(rule.unicodeRange);
|
|
595
|
-
|
|
809
|
+
const sources = rule.sources.map((s) => 'local' in s ? `local(${s.local})` : s.url);
|
|
810
|
+
return `${sources.join(' ')}@${rule.weight.join('-')}${rule.style}#${range}`;
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* The family of the face a `local()` names, or null when the system has no
|
|
814
|
+
* such face and the next source is tried.
|
|
815
|
+
*
|
|
816
|
+
* CSS Fonts 4 (4.3.1) has the name be one face's — its full name or its
|
|
817
|
+
* PostScript name, never a family's, and never a platform's substitute for
|
|
818
|
+
* it. A font manager has no lookup by either: it takes a family and answers
|
|
819
|
+
* with its best guess, which for a name nobody has is some other font. So
|
|
820
|
+
* the name is matched as a family, at the weight and slant the rule declares
|
|
821
|
+
* its face to have, and the answer counts only when the face that comes back
|
|
822
|
+
* says it is the one asked for: by its family, which is the full name of a
|
|
823
|
+
* family's regular face and how `local()` is nearly always spelled
|
|
824
|
+
* (`local(Arial)`), or by its PostScript name, where an engine finds a face
|
|
825
|
+
* by one. A full name with a style in it (`local(Arial Bold)`) is no family,
|
|
826
|
+
* and is not found.
|
|
827
|
+
*
|
|
828
|
+
* What comes back is the family and not the face: the list names it, and
|
|
829
|
+
* the engine picks among its faces by the weight and slant of the text, as
|
|
830
|
+
* it does for any family. Bold text in a family declared as the one face
|
|
831
|
+
* `local(Arial)` is set in Arial's bold, where a browser emboldens the
|
|
832
|
+
* regular.
|
|
833
|
+
*/
|
|
834
|
+
function localFamily(app, name, rule) {
|
|
835
|
+
const fonts = app.fonts;
|
|
836
|
+
if (typeof fonts?.match !== 'function')
|
|
837
|
+
return null;
|
|
838
|
+
const [lo, hi] = rule.weight;
|
|
839
|
+
try {
|
|
840
|
+
const face = fonts.match(name, {
|
|
841
|
+
weight: Math.max(lo, Math.min(400, hi)),
|
|
842
|
+
style: rule.style,
|
|
843
|
+
});
|
|
844
|
+
const family = face?.familyName;
|
|
845
|
+
if (!family)
|
|
846
|
+
return null;
|
|
847
|
+
const want = name.toLowerCase();
|
|
848
|
+
return family.toLowerCase() === want ||
|
|
849
|
+
face.postscriptName?.toLowerCase() === want
|
|
850
|
+
? family
|
|
851
|
+
: null;
|
|
852
|
+
}
|
|
853
|
+
catch {
|
|
854
|
+
// no fontconfig, or a name it could not read: not found
|
|
855
|
+
return null;
|
|
856
|
+
}
|
|
596
857
|
}
|
|
597
858
|
function rangeKey(ranges) {
|
|
598
859
|
return ranges ? ranges.map(([a, b]) => `${a}-${b}`).join(',') : '*';
|