@sametalmdr/word-editor 0.2.0-alpha → 0.3.0-alpha
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/CHANGELOG.md +108 -70
- package/LICENSE +21 -21
- package/README.md +286 -247
- package/dist/canvas/box-clipboard.js +238 -238
- package/dist/canvas/box-selection.js +80 -80
- package/dist/canvas/canvas-editor.js +502 -502
- package/dist/canvas/controller.js +717 -717
- package/dist/canvas/geometry.js +131 -131
- package/dist/canvas/gesture.d.ts +0 -1
- package/dist/canvas/gesture.js +289 -289
- package/dist/canvas/handles.js +212 -212
- package/dist/canvas/menu.js +82 -82
- package/dist/canvas/mode-controller.js +81 -81
- package/dist/canvas/nudge.js +108 -108
- package/dist/canvas/overlay.js +149 -149
- package/dist/canvas/snap.js +132 -132
- package/dist/canvas/viewport.js +112 -112
- package/dist/canvas/z-order.js +171 -171
- package/dist/commands/alignment.js +150 -150
- package/dist/commands/box.js +272 -272
- package/dist/commands/clipboard.js +93 -93
- package/dist/commands/graphemes.js +112 -112
- package/dist/commands/marks.js +153 -153
- package/dist/commands/paragraph-props.js +176 -176
- package/dist/commands/size.js +368 -368
- package/dist/commands/text.js +291 -291
- package/dist/docx.d.ts +1 -0
- package/dist/docx.js +15 -13
- package/dist/editor/editing-host.js +434 -434
- package/dist/element.js +41 -41
- package/dist/fonts/OFL-Carlito.txt +94 -0
- package/dist/fonts/calibri-metrics.d.ts +27 -0
- package/dist/fonts/calibri-metrics.js +88 -0
- package/dist/history/history.js +433 -433
- package/dist/index.js +63 -63
- package/dist/input/beforeinput.js +224 -224
- package/dist/input/clipboard.js +107 -107
- package/dist/input/composition.js +341 -341
- package/dist/input/keymap.js +54 -54
- package/dist/io/ooxml/custgeom.js +72 -72
- package/dist/io/ooxml/drawingml.js +232 -232
- package/dist/io/ooxml/edits.js +67 -67
- package/dist/io/ooxml/export-splice.js +880 -880
- package/dist/io/ooxml/export.js +365 -365
- package/dist/io/ooxml/fill.d.ts +93 -8
- package/dist/io/ooxml/fill.js +618 -562
- package/dist/io/ooxml/fit.d.ts +252 -0
- package/dist/io/ooxml/fit.js +598 -0
- package/dist/io/ooxml/import-gate.js +200 -200
- package/dist/io/ooxml/import.js +691 -691
- package/dist/io/ooxml/inflate.js +126 -126
- package/dist/io/ooxml/media.js +87 -87
- package/dist/io/ooxml/ns.d.ts +2 -0
- package/dist/io/ooxml/ns.js +26 -21
- package/dist/io/ooxml/numbering.js +290 -290
- package/dist/io/ooxml/opc-write.js +171 -171
- package/dist/io/ooxml/provenance.js +93 -93
- package/dist/io/ooxml/recipe.js +708 -708
- package/dist/io/ooxml/relationships.js +59 -59
- package/dist/io/ooxml/run-fonts.d.ts +89 -0
- package/dist/io/ooxml/run-fonts.js +378 -0
- package/dist/io/ooxml/slots.d.ts +4 -0
- package/dist/io/ooxml/slots.js +582 -581
- package/dist/io/ooxml/styles-resolve.js +257 -257
- package/dist/io/ooxml/units.js +43 -43
- package/dist/io/ooxml/value.js +120 -120
- package/dist/io/ooxml/xml-scan.js +616 -616
- package/dist/io/ooxml/zip-container.js +228 -228
- package/dist/io/ooxml/zip-reject.js +106 -106
- package/dist/measure/placement.js +83 -83
- package/dist/measure/report.js +75 -75
- package/dist/model/ids.js +70 -70
- package/dist/model/normalize.js +146 -146
- package/dist/model/position.js +283 -283
- package/dist/model/transaction.js +209 -209
- package/dist/platform/capabilities.js +25 -25
- package/dist/react/index.js +21 -21
- package/dist/selection/controller.js +315 -315
- package/dist/selection/dom-map.js +334 -334
- package/dist/state/editor-state.js +109 -109
- package/dist/styles.css +66 -66
- package/package.json +94 -93
package/dist/element.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { createEditor } from "./index.js";
|
|
2
|
-
|
|
3
|
-
// `extends HTMLElement` evaluates its base class eagerly at module load —
|
|
4
|
-
// falling back to a plain class keeps this module importable outside a DOM
|
|
5
|
-
// (SSR/prerender). The real base is only used once connectedCallback runs.
|
|
6
|
-
const ElementBase = /** @type {typeof HTMLElement} */ (
|
|
7
|
-
typeof HTMLElement !== "undefined" ? HTMLElement : class {}
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* `<word-editor>` custom element. Wraps createEditor().
|
|
12
|
-
*/
|
|
13
|
-
export class WordEditorElement extends ElementBase {
|
|
14
|
-
/** @type {import("./index.js").Editor | null} */
|
|
15
|
-
#editor = null;
|
|
16
|
-
|
|
17
|
-
connectedCallback() {
|
|
18
|
-
this.#editor = createEditor({ container: this });
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
disconnectedCallback() {
|
|
22
|
-
this.#editor?.destroy();
|
|
23
|
-
this.#editor = null;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Registers `<word-editor>` if custom elements are available and it hasn't
|
|
29
|
-
* been registered yet. Safe to call in non-DOM environments (no-op there).
|
|
30
|
-
*/
|
|
31
|
-
export function registerWordEditorElement() {
|
|
32
|
-
if (typeof customElements === "undefined") {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
if (customElements.get("word-editor")) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
customElements.define("word-editor", WordEditorElement);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
registerWordEditorElement();
|
|
1
|
+
import { createEditor } from "./index.js";
|
|
2
|
+
|
|
3
|
+
// `extends HTMLElement` evaluates its base class eagerly at module load —
|
|
4
|
+
// falling back to a plain class keeps this module importable outside a DOM
|
|
5
|
+
// (SSR/prerender). The real base is only used once connectedCallback runs.
|
|
6
|
+
const ElementBase = /** @type {typeof HTMLElement} */ (
|
|
7
|
+
typeof HTMLElement !== "undefined" ? HTMLElement : class {}
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* `<word-editor>` custom element. Wraps createEditor().
|
|
12
|
+
*/
|
|
13
|
+
export class WordEditorElement extends ElementBase {
|
|
14
|
+
/** @type {import("./index.js").Editor | null} */
|
|
15
|
+
#editor = null;
|
|
16
|
+
|
|
17
|
+
connectedCallback() {
|
|
18
|
+
this.#editor = createEditor({ container: this });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
disconnectedCallback() {
|
|
22
|
+
this.#editor?.destroy();
|
|
23
|
+
this.#editor = null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Registers `<word-editor>` if custom elements are available and it hasn't
|
|
29
|
+
* been registered yet. Safe to call in non-DOM environments (no-op there).
|
|
30
|
+
*/
|
|
31
|
+
export function registerWordEditorElement() {
|
|
32
|
+
if (typeof customElements === "undefined") {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (customElements.get("word-editor")) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
customElements.define("word-editor", WordEditorElement);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
registerWordEditorElement();
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
Copyright 2013 The Carlito Project Authors (https://github.com/googlefonts/carlito), with Reserved Font Name "Carlito"
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
5
|
+
This license is copied below, and is also available with a FAQ at:
|
|
6
|
+
https://scripts.sil.org/OFL
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
-----------------------------------------------------------
|
|
10
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
11
|
+
-----------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
PREAMBLE
|
|
14
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
15
|
+
development of collaborative font projects, to support the font creation
|
|
16
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
17
|
+
open framework in which fonts may be shared and improved in partnership
|
|
18
|
+
with others.
|
|
19
|
+
|
|
20
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
21
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
22
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
23
|
+
redistributed and/or sold with any software provided that any reserved
|
|
24
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
25
|
+
however, cannot be released under any other type of license. The
|
|
26
|
+
requirement for fonts to remain under this license does not apply
|
|
27
|
+
to any document created using the fonts or their derivatives.
|
|
28
|
+
|
|
29
|
+
DEFINITIONS
|
|
30
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
31
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
32
|
+
include source files, build scripts and documentation.
|
|
33
|
+
|
|
34
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
35
|
+
copyright statement(s).
|
|
36
|
+
|
|
37
|
+
"Original Version" refers to the collection of Font Software components as
|
|
38
|
+
distributed by the Copyright Holder(s).
|
|
39
|
+
|
|
40
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
41
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
42
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
43
|
+
new environment.
|
|
44
|
+
|
|
45
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
46
|
+
writer or other person who contributed to the Font Software.
|
|
47
|
+
|
|
48
|
+
PERMISSION & CONDITIONS
|
|
49
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
50
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
51
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
52
|
+
Software, subject to the following conditions:
|
|
53
|
+
|
|
54
|
+
1) Neither the Font Software nor any of its individual components,
|
|
55
|
+
in Original or Modified Versions, may be sold by itself.
|
|
56
|
+
|
|
57
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
58
|
+
redistributed and/or sold with any software, provided that each copy
|
|
59
|
+
contains the above copyright notice and this license. These can be
|
|
60
|
+
included either as stand-alone text files, human-readable headers or
|
|
61
|
+
in the appropriate machine-readable metadata fields within text or
|
|
62
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
63
|
+
|
|
64
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
65
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
66
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
67
|
+
presented to the users.
|
|
68
|
+
|
|
69
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
70
|
+
Software shall not be used to promote, endorse or advertise any
|
|
71
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
72
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
73
|
+
permission.
|
|
74
|
+
|
|
75
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
76
|
+
must be distributed entirely under this license, and must not be
|
|
77
|
+
distributed under any other license. The requirement for fonts to
|
|
78
|
+
remain under this license does not apply to any document created
|
|
79
|
+
using the Font Software.
|
|
80
|
+
|
|
81
|
+
TERMINATION
|
|
82
|
+
This license becomes null and void if any of the above conditions are
|
|
83
|
+
not met.
|
|
84
|
+
|
|
85
|
+
DISCLAIMER
|
|
86
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
87
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
88
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
89
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
90
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
91
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
92
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
93
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
94
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {readonly [number, readonly number[]]} MetricsRun first code point, then one advance per code point
|
|
3
|
+
* @typedef {"regular" | "bold" | "italic" | "boldItalic"} MetricsStyle
|
|
4
|
+
*/
|
|
5
|
+
/** @type {Readonly<{family: string, unitsPerEm: number, source: Record<MetricsStyle, {carlito: {file: string, sha256: string, version: string | null}, calibri: {file: string, sha256: string, version: string | null}}>, styles: Record<MetricsStyle, readonly MetricsRun[]>}>} */
|
|
6
|
+
export const CALIBRI_METRICS: Readonly<{
|
|
7
|
+
family: string;
|
|
8
|
+
unitsPerEm: number;
|
|
9
|
+
source: Record<MetricsStyle, {
|
|
10
|
+
carlito: {
|
|
11
|
+
file: string;
|
|
12
|
+
sha256: string;
|
|
13
|
+
version: string | null;
|
|
14
|
+
};
|
|
15
|
+
calibri: {
|
|
16
|
+
file: string;
|
|
17
|
+
sha256: string;
|
|
18
|
+
version: string | null;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
styles: Record<MetricsStyle, readonly MetricsRun[]>;
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* first code point, then one advance per code point
|
|
25
|
+
*/
|
|
26
|
+
export type MetricsRun = readonly [number, readonly number[]];
|
|
27
|
+
export type MetricsStyle = "regular" | "bold" | "italic" | "boldItalic";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// Calibri-compatible advance widths (FR4a, ADR-0042 Karar 7). GENERATED by scripts/fonts/widths.py -- do not edit.
|
|
2
|
+
// Read from Carlito (SIL Open Font License 1.1, Reserved Font Name "Carlito"; see OFL-Carlito.txt next to this file)
|
|
3
|
+
// and kept only where Carlito's advance equals Calibri's (the version below), style by style. A code point outside
|
|
4
|
+
// every run is not in the table: checkFit returns "unknown" for it. Units per em 2048.
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @typedef {readonly [number, readonly number[]]} MetricsRun first code point, then one advance per code point
|
|
8
|
+
* @typedef {"regular" | "bold" | "italic" | "boldItalic"} MetricsStyle
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** @type {Readonly<{family: string, unitsPerEm: number, source: Record<MetricsStyle, {carlito: {file: string, sha256: string, version: string | null}, calibri: {file: string, sha256: string, version: string | null}}>, styles: Record<MetricsStyle, readonly MetricsRun[]>}>} */
|
|
12
|
+
export const CALIBRI_METRICS = deepFreeze({
|
|
13
|
+
family: "Calibri",
|
|
14
|
+
unitsPerEm: 2048,
|
|
15
|
+
source: {
|
|
16
|
+
regular: { carlito: {"file": "Carlito-Regular.ttf", "sha256": "f6418f708baede9789daef5d458c0f53d2a888af9820e8062934e504fedc6595", "version": "Version 1.104"}, calibri: {"file": "calibri.ttf", "sha256": "198e8dac512206f27c9bdbfeb3d5b3e55a33de9dcf58d801823ef8c5ef5a76dc", "version": "Version 6.23"} },
|
|
17
|
+
bold: { carlito: {"file": "Carlito-Bold.ttf", "sha256": "bb5d20f79b82599ec72983597437373a80f2d2085fa91fc144fd74e876a594db", "version": "Version 1.104"}, calibri: {"file": "calibrib.ttf", "sha256": "4d5c56c07c41315022cd5a24966ade3983ceebce8bc81524e56e4632dd3f242f", "version": "Version 6.23"} },
|
|
18
|
+
italic: { carlito: {"file": "Carlito-Italic.ttf", "sha256": "0b019225e58d702bfedcbd35c21696769f8ee115cb6343f84c2f240312450d1c", "version": "Version 1.104"}, calibri: {"file": "calibrii.ttf", "sha256": "5c85b9adedde710e754b3163005291eca16cd0ccccc7c8d7ff526070e8980202", "version": "Version 6.23"} },
|
|
19
|
+
boldItalic: { carlito: {"file": "Carlito-BoldItalic.ttf", "sha256": "b32928186c119599e03ca6a1ffc680fdcb7fac95772f4b95d989cf6cd3861517", "version": "Version 1.104"}, calibri: {"file": "calibriz.ttf", "sha256": "95b49ebc8244b88ef49372833e8964dad6a3d7fa53e948609c5c73d5a1439912", "version": "Version 6.23"} },
|
|
20
|
+
},
|
|
21
|
+
styles: {
|
|
22
|
+
regular: [
|
|
23
|
+
[0x0020, [463, 667, 821, 1020, 1038, 1464, 1397, 452, 621, 621, 1020, 1020, 511, 627, 517, 791, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 548, 548, 1020, 1020, 1020, 949, 1831, 1185, 1114, 1092, 1260, 1000, 941, 1292, 1276, 516, 653, 1064, 861, 1751, 1322, 1356, 1058, 1378, 1112, 941, 998, 1314, 1162, 1822, 1063, 998, 959, 628, 791, 628, 1020, 1020, 596, 981, 1076, 866, 1076, 1019, 625, 964, 1076, 470, 490, 931, 470, 1636, 1076, 1080, 1076, 1076, 714, 801, 686, 1076, 925, 1464, 887, 927, 809, 644, 943, 644, 1020]],
|
|
24
|
+
[0x00a0, [463, 667, 1020, 1038, 1020, 1038, 1020, 1020, 804, 1709, 824, 1049, 1020]],
|
|
25
|
+
[0x00ae, [1038, 807, 694, 1020, 688, 685, 598, 1126, 1200, 517, 629, 504, 865, 1049, 1303, 1375, 1383, 949, 1185, 1185, 1185, 1185, 1185, 1185, 1563, 1092, 1000, 1000, 1000, 1000, 516, 516, 516, 516, 1279, 1322, 1356, 1356, 1356, 1356, 1356, 1020, 1359, 1314, 1314, 1314, 1314, 998, 1058, 1080, 981, 981, 981, 981, 981, 981, 1583, 866, 1019, 1019, 1019, 1019, 470, 470, 470, 470, 1076, 1076, 1080, 1080, 1080, 1080, 1080, 1020, 1084, 1076, 1076, 1076, 1076, 927, 1076, 927, 1185, 981, 1185, 981, 1185, 981, 1092, 866, 1092, 866, 1092, 866, 1092, 866, 1260, 1164, 1279, 1130, 1000, 1019, 1000, 1019, 1000, 1019, 1000, 1019, 1000, 1019, 1292, 964, 1292, 964, 1292, 964, 1292, 964, 1276, 1076, 1344, 1091, 516, 470, 516, 470, 516, 470, 516, 470, 516, 470, 1170, 960, 653, 490, 1064, 931, 931, 861, 470, 861, 470, 866, 540, 1118, 765, 880, 507, 1322, 1076, 1322, 1076, 1322, 1076, 1186, 1287, 1076, 1356, 1080, 1356, 1080, 1356, 1080, 1775, 1740, 1112, 714, 1112, 714, 1112, 714, 941, 801, 941, 801, 941, 801, 941, 801, 998, 686, 998, 708, 998, 700, 1314, 1076, 1314, 1076, 1314, 1076, 1314, 1076, 1314, 1076, 1314, 1076, 1822, 1464, 998, 927, 998, 959, 809, 959, 809, 959, 809, 497]],
|
|
26
|
+
[0x2012, [1038, 1020, 1854, 1854, 809, 1020, 511, 511, 511, 511, 857, 857, 857, 856, 1020, 1020, 1020]],
|
|
27
|
+
[0x2026, [1414]],
|
|
28
|
+
[0x2030, [2126]],
|
|
29
|
+
[0x2033, [820, 1188]],
|
|
30
|
+
[0x2039, [694, 694]],
|
|
31
|
+
[0x20ac, [1038]],
|
|
32
|
+
[0x2116, [2099]],
|
|
33
|
+
[0x2122, [1444]],
|
|
34
|
+
],
|
|
35
|
+
bold: [
|
|
36
|
+
[0x0020, [463, 667, 898, 1020, 1038, 1493, 1443, 478, 638, 638, 1020, 1020, 528, 627, 547, 880, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 565, 565, 1020, 1020, 1020, 949, 1840, 1241, 1148, 1084, 1291, 999, 940, 1305, 1292, 546, 678, 1120, 866, 1790, 1349, 1385, 1090, 1405, 1153, 968, 1014, 1337, 1211, 1856, 1128, 1064, 979, 665, 880, 665, 1020, 1020, 615, 1011, 1099, 857, 1099, 1031, 648, 971, 1099, 503, 523, 983, 503, 1666, 1099, 1101, 1099, 1099, 728, 817, 710, 1099, 969, 1526, 941, 970, 814, 704, 973, 704, 1020]],
|
|
37
|
+
[0x00a0, [463, 667, 1020, 1038, 1020, 1038, 1020, 1020, 849, 1709, 852, 1103, 1020]],
|
|
38
|
+
[0x00ae, [1038, 799, 701, 1020, 692, 688, 616, 1154, 1224, 548, 621, 517, 891, 1103, 1347, 1415, 1437, 949, 1241, 1241, 1241, 1241, 1241, 1241, 1588, 1084, 999, 999, 999, 999, 546, 546, 546, 546, 1309, 1349, 1385, 1385, 1385, 1385, 1385, 1020, 1394, 1337, 1337, 1337, 1337, 1064, 1090, 1136, 1011, 1011, 1011, 1011, 1011, 1011, 1587, 857, 1031, 1031, 1031, 1031, 503, 503, 503, 503, 1099, 1099, 1101, 1101, 1101, 1101, 1101, 1020, 1114, 1099, 1099, 1099, 1099, 970, 1099, 970, 1241, 1011, 1241, 1011, 1241, 1011, 1084, 857, 1084, 857, 1084, 857, 1084, 857, 1291, 1222, 1309, 1165, 999, 1031, 999, 1031, 999, 1031, 999, 1031, 999, 1031, 1305, 971, 1305, 971, 1305, 971, 1305, 971, 1292, 1099, 1347, 1121, 546, 503, 546, 503, 546, 503, 546, 503, 546, 503, 1225, 1027, 678, 523, 1120, 983, 983, 866, 503, 866, 503, 881, 627, 1150, 865, 886, 540, 1349, 1099, 1349, 1099, 1349, 1099, 1274, 1313, 1099, 1385, 1101, 1385, 1101, 1385, 1101, 1790, 1726, 1153, 728, 1153, 728, 1153, 728, 968, 817, 968, 817, 968, 817, 968, 817, 1014, 710, 1014, 744, 1014, 726, 1337, 1099, 1337, 1099, 1337, 1099, 1337, 1099, 1337, 1099, 1337, 1099, 1856, 1526, 1064, 970, 1064, 979, 814, 979, 814, 979, 814, 529]],
|
|
39
|
+
[0x2012, [1038, 1020, 1854, 1854, 985, 1022, 528, 528, 528, 528, 891, 891, 891, 891, 1020, 1020, 1020]],
|
|
40
|
+
[0x2026, [1457]],
|
|
41
|
+
[0x2030, [2174]],
|
|
42
|
+
[0x2033, [835, 1221]],
|
|
43
|
+
[0x2039, [705, 705]],
|
|
44
|
+
[0x20ac, [1038]],
|
|
45
|
+
[0x2116, [2142]],
|
|
46
|
+
[0x2122, [1475]],
|
|
47
|
+
],
|
|
48
|
+
italic: [
|
|
49
|
+
[0x0020, [463, 667, 821, 1020, 1038, 1464, 1397, 452, 621, 621, 1020, 1020, 511, 627, 517, 794, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 548, 548, 1020, 1020, 1020, 949, 1831, 1185, 1114, 1070, 1260, 1000, 941, 1292, 1276, 516, 653, 1064, 861, 1751, 1320, 1340, 1058, 1360, 1112, 926, 998, 1314, 1162, 1823, 1063, 998, 959, 628, 787, 628, 1020, 1020, 596, 1053, 1053, 852, 1053, 978, 625, 1053, 1053, 470, 490, 931, 470, 1620, 1053, 1051, 1053, 1053, 702, 797, 686, 1053, 913, 1464, 887, 916, 809, 644, 943, 644, 1020]],
|
|
50
|
+
[0x00a0, [463, 667, 1020, 1038, 1020, 1038, 1020, 1020, 804, 1709, 882, 1049, 1020]],
|
|
51
|
+
[0x00ae, [1038, 807, 694, 1020, 688, 685, 598, 1102, 1200, 517, 629, 504, 865, 1049, 1303, 1375, 1383, 949, 1185, 1185, 1185, 1185, 1185, 1185, 1563, 1070, 1000, 1000, 1000, 1000, 516, 516, 516, 516, 1279, 1320, 1340, 1340, 1340, 1340, 1340, 1020, 1347, 1314, 1314, 1314, 1314, 998, 1058, 1080, 1053, 1053, 1053, 1053, 1053, 1053, 1545, 852, 978, 978, 978, 978, 470, 470, 470, 470, 1076, 1053, 1051, 1051, 1051, 1051, 1051, 1020, 1084, 1053, 1053, 1053, 1053, 916, 1053, 916, 1185, 1053, 1185, 1053, 1185, 1053, 1070, 852, 1070, 852, 1070, 852, 1070, 852, 1260, 1136, 1279, 1128, 1000, 978, 1000, 978, 1000, 978, 1000, 978, 1000, 978, 1292, 1053, 1292, 1053, 1292, 1053, 1292, 1053, 1276, 1053, 1344, 1066, 516, 470, 516, 470, 516, 470, 516, 470, 516, 470, 1170, 960, 653, 490, 1064, 931, 931, 861, 470, 861, 470, 866, 540, 1118, 765, 880, 507, 1320, 1053, 1320, 1053, 1320, 1053, 1165, 1284, 1053, 1340, 1051, 1340, 1051, 1340, 1051, 1775, 1668, 1112, 702, 1112, 702, 1112, 702, 926, 797, 926, 797, 926, 797, 926, 797, 998, 686, 998, 708, 998, 700, 1314, 1053, 1314, 1053, 1314, 1053, 1314, 1053, 1314, 1053, 1314, 1053, 1823, 1464, 998, 916, 998, 959, 809, 959, 809, 959, 809, 497]],
|
|
52
|
+
[0x2012, [1038, 1020, 1854, 1854, 1038, 1020, 511, 511, 511, 511, 857, 857, 857, 856, 1020, 1020, 1020]],
|
|
53
|
+
[0x2026, [1413]],
|
|
54
|
+
[0x2030, [2126]],
|
|
55
|
+
[0x2033, [820, 1188]],
|
|
56
|
+
[0x2039, [694, 694]],
|
|
57
|
+
[0x20ac, [1038]],
|
|
58
|
+
[0x2116, [2093]],
|
|
59
|
+
[0x2122, [1444]],
|
|
60
|
+
],
|
|
61
|
+
boldItalic: [
|
|
62
|
+
[0x0020, [463, 667, 898, 1020, 1038, 1493, 1443, 478, 638, 638, 1020, 1020, 528, 627, 547, 889, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 565, 565, 1020, 1020, 1020, 949, 1840, 1241, 1148, 1062, 1291, 999, 940, 1305, 1292, 546, 678, 1120, 866, 1790, 1344, 1369, 1090, 1387, 1153, 953, 1014, 1337, 1211, 1857, 1128, 1064, 979, 665, 870, 665, 1020, 1020, 615, 1081, 1081, 843, 1081, 1006, 648, 1081, 1080, 503, 523, 983, 503, 1646, 1080, 1080, 1081, 1081, 721, 807, 710, 1080, 961, 1526, 941, 963, 814, 704, 973, 704, 1020]],
|
|
63
|
+
[0x00a0, [463, 667, 1020, 1038, 1020, 1038, 1020, 1020, 849, 1709, 903, 1103, 1020]],
|
|
64
|
+
[0x00ae, [1038, 799, 701, 1020, 692, 688, 616, 1134, 1224, 548, 621, 517, 891, 1103, 1347, 1415, 1437, 949, 1241, 1241, 1241, 1241, 1241, 1241, 1588, 1062, 999, 999, 999, 999, 546, 546, 546, 546, 1309, 1344, 1369, 1369, 1369, 1369, 1369, 1020, 1387, 1337, 1337, 1337, 1337, 1064, 1090, 1136, 1081, 1081, 1081, 1081, 1081, 1081, 1564, 843, 1006, 1006, 1006, 1006, 503, 503, 503, 503, 1099, 1080, 1080, 1080, 1080, 1080, 1080, 1020, 1114, 1080, 1080, 1080, 1080, 963, 1081, 963, 1241, 1081, 1241, 1081, 1241, 1081, 1062, 843, 1062, 843, 1062, 843, 1062, 843, 1291, 1205, 1309, 1160, 999, 1006, 999, 1006, 999, 1006, 999, 1006, 999, 1006, 1305, 1081, 1305, 1081, 1305, 1081, 1305, 1081, 1292, 1080, 1347, 1098, 546, 503, 546, 503, 546, 503, 546, 503, 546, 503, 1225, 1027, 678, 523, 1120, 983, 983, 866, 503, 866, 503, 881, 627, 1150, 865, 886, 540, 1344, 1080, 1344, 1080, 1344, 1080, 1261, 1305, 1080, 1369, 1080, 1369, 1080, 1369, 1080, 1790, 1673, 1153, 721, 1153, 721, 1153, 721, 953, 807, 953, 807, 953, 807, 953, 807, 1014, 710, 1014, 744, 1014, 726, 1337, 1080, 1337, 1080, 1337, 1080, 1337, 1080, 1337, 1080, 1337, 1080, 1857, 1526, 1064, 963, 1064, 979, 814, 979, 814, 979, 814, 529]],
|
|
65
|
+
[0x2012, [1038, 1020, 1854, 1854, 985, 1022, 528, 528, 528, 511, 891, 891, 891, 856, 1020, 1020, 1020]],
|
|
66
|
+
[0x2026, [1456]],
|
|
67
|
+
[0x2030, [2174]],
|
|
68
|
+
[0x2033, [809, 1201]],
|
|
69
|
+
[0x2039, [705, 705]],
|
|
70
|
+
[0x20ac, [1038]],
|
|
71
|
+
[0x2116, [2134]],
|
|
72
|
+
[0x2122, [1475]],
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @template T
|
|
79
|
+
* @param {T} value
|
|
80
|
+
* @returns {T}
|
|
81
|
+
*/
|
|
82
|
+
function deepFreeze(value) {
|
|
83
|
+
if (value !== null && typeof value === "object") {
|
|
84
|
+
for (const child of Object.values(value)) deepFreeze(child);
|
|
85
|
+
Object.freeze(value);
|
|
86
|
+
}
|
|
87
|
+
return value;
|
|
88
|
+
}
|