@remotion/google-fonts 4.0.324 → 4.0.326
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/cjs/Bitcount.d.ts +70 -0
- package/dist/cjs/Bitcount.js +61 -0
- package/dist/cjs/BitcountGridSingle.d.ts +70 -0
- package/dist/cjs/BitcountGridSingle.js +61 -0
- package/dist/cjs/BitcountPropDouble.d.ts +70 -0
- package/dist/cjs/BitcountPropDouble.js +61 -0
- package/dist/cjs/BitcountPropSingle.d.ts +70 -0
- package/dist/cjs/BitcountPropSingle.js +61 -0
- package/dist/cjs/BitcountSingle.d.ts +70 -0
- package/dist/cjs/BitcountSingle.js +61 -0
- package/dist/cjs/CactusClassicalSerif.js +106 -106
- package/dist/cjs/GoogleSansCode.d.ts +205 -0
- package/dist/cjs/GoogleSansCode.js +204 -0
- package/dist/cjs/IntelOneMono.d.ts +102 -0
- package/dist/cjs/IntelOneMono.js +89 -0
- package/dist/cjs/index.js +35 -0
- package/dist/esm/{Linefont.mjs → Bitcount.mjs} +51 -9
- package/dist/esm/BitcountGridSingle.mjs +169 -0
- package/dist/esm/BitcountPropDouble.mjs +169 -0
- package/dist/esm/BitcountPropSingle.mjs +169 -0
- package/dist/esm/BitcountSingle.mjs +169 -0
- package/dist/esm/CactusClassicalSerif.mjs +106 -106
- package/dist/esm/GoogleSansCode.mjs +312 -0
- package/dist/esm/IntelOneMono.mjs +197 -0
- package/dist/esm/index.mjs +35 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +23 -2
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
// src/base.ts
|
|
2
|
+
import { continueRender, delayRender } from "remotion";
|
|
3
|
+
import { NoReactInternals } from "remotion/no-react";
|
|
4
|
+
var loadedFonts = {};
|
|
5
|
+
var withResolvers = function() {
|
|
6
|
+
let resolve;
|
|
7
|
+
let reject;
|
|
8
|
+
const promise = new Promise((res, rej) => {
|
|
9
|
+
resolve = res;
|
|
10
|
+
reject = rej;
|
|
11
|
+
});
|
|
12
|
+
return { promise, resolve, reject };
|
|
13
|
+
};
|
|
14
|
+
var loadFontFaceOrTimeoutAfter20Seconds = (fontFace) => {
|
|
15
|
+
const timeout = withResolvers();
|
|
16
|
+
const int = setTimeout(() => {
|
|
17
|
+
timeout.reject(new Error("Timed out loading Google Font"));
|
|
18
|
+
}, 18000);
|
|
19
|
+
return Promise.race([
|
|
20
|
+
fontFace.load().then(() => {
|
|
21
|
+
clearTimeout(int);
|
|
22
|
+
}),
|
|
23
|
+
timeout.promise
|
|
24
|
+
]);
|
|
25
|
+
};
|
|
26
|
+
var loadFonts = (meta, style, options) => {
|
|
27
|
+
const weightsAndSubsetsAreSpecified = Array.isArray(options?.weights) && Array.isArray(options?.subsets) && options.weights.length > 0 && options.subsets.length > 0;
|
|
28
|
+
if (NoReactInternals.ENABLE_V5_BREAKING_CHANGES && !weightsAndSubsetsAreSpecified) {
|
|
29
|
+
throw new Error("Loading Google Fonts without specifying weights and subsets is not supported in Remotion v5. Please specify the weights and subsets you need.");
|
|
30
|
+
}
|
|
31
|
+
const promises = [];
|
|
32
|
+
const styles = style ? [style] : Object.keys(meta.fonts);
|
|
33
|
+
let fontsLoaded = 0;
|
|
34
|
+
for (const style2 of styles) {
|
|
35
|
+
if (typeof FontFace === "undefined") {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
if (!meta.fonts[style2]) {
|
|
39
|
+
throw new Error(`The font ${meta.fontFamily} does not have a style ${style2}`);
|
|
40
|
+
}
|
|
41
|
+
const weights = options?.weights ?? Object.keys(meta.fonts[style2]);
|
|
42
|
+
for (const weight of weights) {
|
|
43
|
+
if (!meta.fonts[style2][weight]) {
|
|
44
|
+
throw new Error(`The font ${meta.fontFamily} does not have a weight ${weight} in style ${style2}`);
|
|
45
|
+
}
|
|
46
|
+
const subsets = options?.subsets ?? Object.keys(meta.fonts[style2][weight]);
|
|
47
|
+
for (const subset of subsets) {
|
|
48
|
+
let font = meta.fonts[style2]?.[weight]?.[subset];
|
|
49
|
+
if (!font) {
|
|
50
|
+
throw new Error(`weight: ${weight} subset: ${subset} is not available for '${meta.fontFamily}'`);
|
|
51
|
+
}
|
|
52
|
+
let fontKey = `${meta.fontFamily}-${style2}-${weight}-${subset}`;
|
|
53
|
+
const previousPromise = loadedFonts[fontKey];
|
|
54
|
+
if (previousPromise) {
|
|
55
|
+
promises.push(previousPromise);
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const baseLabel = `Fetching ${meta.fontFamily} font ${JSON.stringify({
|
|
59
|
+
style: style2,
|
|
60
|
+
weight,
|
|
61
|
+
subset
|
|
62
|
+
})}`;
|
|
63
|
+
const label = weightsAndSubsetsAreSpecified ? baseLabel : `${baseLabel}. This might be caused by loading too many font variations. Read more: https://www.remotion.dev/docs/troubleshooting/font-loading-errors#render-timeout-when-loading-google-fonts`;
|
|
64
|
+
const handle = delayRender(label, { timeoutInMilliseconds: 60000 });
|
|
65
|
+
fontsLoaded++;
|
|
66
|
+
const fontFace = new FontFace(meta.fontFamily, `url(${font}) format('woff2')`, {
|
|
67
|
+
weight,
|
|
68
|
+
style: style2,
|
|
69
|
+
unicodeRange: meta.unicodeRanges[subset]
|
|
70
|
+
});
|
|
71
|
+
let attempts = 2;
|
|
72
|
+
const tryToLoad = () => {
|
|
73
|
+
if (fontFace.status === "loaded") {
|
|
74
|
+
continueRender(handle);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const promise = loadFontFaceOrTimeoutAfter20Seconds(fontFace).then(() => {
|
|
78
|
+
(options?.document ?? document).fonts.add(fontFace);
|
|
79
|
+
continueRender(handle);
|
|
80
|
+
}).catch((err) => {
|
|
81
|
+
loadedFonts[fontKey] = undefined;
|
|
82
|
+
if (attempts === 0) {
|
|
83
|
+
throw err;
|
|
84
|
+
} else {
|
|
85
|
+
attempts--;
|
|
86
|
+
tryToLoad();
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
loadedFonts[fontKey] = promise;
|
|
90
|
+
promises.push(promise);
|
|
91
|
+
};
|
|
92
|
+
tryToLoad();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (fontsLoaded > 20) {
|
|
96
|
+
console.warn(`Made ${fontsLoaded} network requests to load fonts for ${meta.fontFamily}. Consider loading fewer weights and subsets by passing options to loadFont(). Disable this warning by passing "ignoreTooManyRequestsWarning: true" to "options".`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
fontFamily: meta.fontFamily,
|
|
101
|
+
fonts: meta.fonts,
|
|
102
|
+
unicodeRanges: meta.unicodeRanges,
|
|
103
|
+
waitUntilDone: () => Promise.all(promises).then(() => {
|
|
104
|
+
return;
|
|
105
|
+
})
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
// src/GoogleSansCode.ts
|
|
110
|
+
var getInfo = () => ({
|
|
111
|
+
fontFamily: "Google Sans Code",
|
|
112
|
+
importName: "GoogleSansCode",
|
|
113
|
+
version: "v11",
|
|
114
|
+
url: "https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800",
|
|
115
|
+
unicodeRanges: {
|
|
116
|
+
adlam: "U+061F, U+0640, U+2015, U+201B, U+2020-2021, U+2030, U+204F, U+25CC, U+2E28-2E29, U+2E41, U+1E900-1E95F",
|
|
117
|
+
"canadian-aboriginal": "U+02C7, U+02D8-02D9, U+02DB, U+0307, U+1400-167F, U+18B0-18F5, U+25CC, U+11AB0-11ABF",
|
|
118
|
+
cherokee: "U+0300-0302, U+0304, U+030B-030C, U+0323-0324, U+0330-0331, U+13A0-13FF, U+AB70-ABBF",
|
|
119
|
+
math: "U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF",
|
|
120
|
+
"old-permic": "U+0300, U+0306-0308, U+0313, U+0483, U+20DB, U+25CC, U+10350-1037A",
|
|
121
|
+
symbols: "U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF",
|
|
122
|
+
symbols2: "U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F",
|
|
123
|
+
syriac: "U+0303-0304, U+0307-0308, U+030A, U+0320, U+0323-0325, U+032D-032E, U+0330-0331, U+060C, U+061B-061C, U+061F, U+0621, U+0640, U+064B-0655, U+0660-066C, U+0670, U+0700-074F, U+0860-086A, U+1DF8, U+1DFA, U+200C-200F, U+25CC, U+2670-2671",
|
|
124
|
+
vietnamese: "U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB",
|
|
125
|
+
"latin-ext": "U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF",
|
|
126
|
+
latin: "U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"
|
|
127
|
+
},
|
|
128
|
+
fonts: {
|
|
129
|
+
italic: {
|
|
130
|
+
"300": {
|
|
131
|
+
adlam: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUz06tnvM.woff2",
|
|
132
|
+
"canadian-aboriginal": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUgk6tnvM.woff2",
|
|
133
|
+
cherokee: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUvk6tnvM.woff2",
|
|
134
|
+
math: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtU0U6tnvM.woff2",
|
|
135
|
+
"old-permic": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUwU6tnvM.woff2",
|
|
136
|
+
symbols: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUw06tnvM.woff2",
|
|
137
|
+
symbols2: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUF2-Io8pO.woff2",
|
|
138
|
+
syriac: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtU3k6tnvM.woff2",
|
|
139
|
+
vietnamese: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUok6tnvM.woff2",
|
|
140
|
+
"latin-ext": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUo06tnvM.woff2",
|
|
141
|
+
latin: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUrU6t.woff2"
|
|
142
|
+
},
|
|
143
|
+
"400": {
|
|
144
|
+
adlam: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUz06tnvM.woff2",
|
|
145
|
+
"canadian-aboriginal": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUgk6tnvM.woff2",
|
|
146
|
+
cherokee: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUvk6tnvM.woff2",
|
|
147
|
+
math: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtU0U6tnvM.woff2",
|
|
148
|
+
"old-permic": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUwU6tnvM.woff2",
|
|
149
|
+
symbols: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUw06tnvM.woff2",
|
|
150
|
+
symbols2: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUF2-Io8pO.woff2",
|
|
151
|
+
syriac: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtU3k6tnvM.woff2",
|
|
152
|
+
vietnamese: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUok6tnvM.woff2",
|
|
153
|
+
"latin-ext": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUo06tnvM.woff2",
|
|
154
|
+
latin: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUrU6t.woff2"
|
|
155
|
+
},
|
|
156
|
+
"500": {
|
|
157
|
+
adlam: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUz06tnvM.woff2",
|
|
158
|
+
"canadian-aboriginal": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUgk6tnvM.woff2",
|
|
159
|
+
cherokee: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUvk6tnvM.woff2",
|
|
160
|
+
math: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtU0U6tnvM.woff2",
|
|
161
|
+
"old-permic": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUwU6tnvM.woff2",
|
|
162
|
+
symbols: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUw06tnvM.woff2",
|
|
163
|
+
symbols2: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUF2-Io8pO.woff2",
|
|
164
|
+
syriac: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtU3k6tnvM.woff2",
|
|
165
|
+
vietnamese: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUok6tnvM.woff2",
|
|
166
|
+
"latin-ext": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUo06tnvM.woff2",
|
|
167
|
+
latin: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUrU6t.woff2"
|
|
168
|
+
},
|
|
169
|
+
"600": {
|
|
170
|
+
adlam: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUz06tnvM.woff2",
|
|
171
|
+
"canadian-aboriginal": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUgk6tnvM.woff2",
|
|
172
|
+
cherokee: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUvk6tnvM.woff2",
|
|
173
|
+
math: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtU0U6tnvM.woff2",
|
|
174
|
+
"old-permic": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUwU6tnvM.woff2",
|
|
175
|
+
symbols: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUw06tnvM.woff2",
|
|
176
|
+
symbols2: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUF2-Io8pO.woff2",
|
|
177
|
+
syriac: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtU3k6tnvM.woff2",
|
|
178
|
+
vietnamese: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUok6tnvM.woff2",
|
|
179
|
+
"latin-ext": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUo06tnvM.woff2",
|
|
180
|
+
latin: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUrU6t.woff2"
|
|
181
|
+
},
|
|
182
|
+
"700": {
|
|
183
|
+
adlam: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUz06tnvM.woff2",
|
|
184
|
+
"canadian-aboriginal": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUgk6tnvM.woff2",
|
|
185
|
+
cherokee: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUvk6tnvM.woff2",
|
|
186
|
+
math: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtU0U6tnvM.woff2",
|
|
187
|
+
"old-permic": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUwU6tnvM.woff2",
|
|
188
|
+
symbols: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUw06tnvM.woff2",
|
|
189
|
+
symbols2: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUF2-Io8pO.woff2",
|
|
190
|
+
syriac: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtU3k6tnvM.woff2",
|
|
191
|
+
vietnamese: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUok6tnvM.woff2",
|
|
192
|
+
"latin-ext": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUo06tnvM.woff2",
|
|
193
|
+
latin: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUrU6t.woff2"
|
|
194
|
+
},
|
|
195
|
+
"800": {
|
|
196
|
+
adlam: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUz06tnvM.woff2",
|
|
197
|
+
"canadian-aboriginal": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUgk6tnvM.woff2",
|
|
198
|
+
cherokee: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUvk6tnvM.woff2",
|
|
199
|
+
math: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtU0U6tnvM.woff2",
|
|
200
|
+
"old-permic": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUwU6tnvM.woff2",
|
|
201
|
+
symbols: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUw06tnvM.woff2",
|
|
202
|
+
symbols2: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUF2-Io8pO.woff2",
|
|
203
|
+
syriac: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtU3k6tnvM.woff2",
|
|
204
|
+
vietnamese: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUok6tnvM.woff2",
|
|
205
|
+
"latin-ext": "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUo06tnvM.woff2",
|
|
206
|
+
latin: "https://fonts.gstatic.com/s/googlesanscode/v11/pxiZyogzv91QhV44Z_GQBHsGf5PuWEtUrU6t.woff2"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
normal: {
|
|
210
|
+
"300": {
|
|
211
|
+
adlam: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCxkr1ap.woff2",
|
|
212
|
+
"canadian-aboriginal": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWGFkr1ap.woff2",
|
|
213
|
+
cherokee: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWF1kr1ap.woff2",
|
|
214
|
+
math: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWDJkr1ap.woff2",
|
|
215
|
+
"old-permic": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCJkr1ap.woff2",
|
|
216
|
+
symbols: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCBkr1ap.woff2",
|
|
217
|
+
symbols2: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWPRFimuQpw.woff2",
|
|
218
|
+
syriac: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWD1kr1ap.woff2",
|
|
219
|
+
vietnamese: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWEFkr1ap.woff2",
|
|
220
|
+
"latin-ext": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWEBkr1ap.woff2",
|
|
221
|
+
latin: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWE5krw.woff2"
|
|
222
|
+
},
|
|
223
|
+
"400": {
|
|
224
|
+
adlam: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCxkr1ap.woff2",
|
|
225
|
+
"canadian-aboriginal": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWGFkr1ap.woff2",
|
|
226
|
+
cherokee: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWF1kr1ap.woff2",
|
|
227
|
+
math: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWDJkr1ap.woff2",
|
|
228
|
+
"old-permic": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCJkr1ap.woff2",
|
|
229
|
+
symbols: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCBkr1ap.woff2",
|
|
230
|
+
symbols2: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWPRFimuQpw.woff2",
|
|
231
|
+
syriac: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWD1kr1ap.woff2",
|
|
232
|
+
vietnamese: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWEFkr1ap.woff2",
|
|
233
|
+
"latin-ext": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWEBkr1ap.woff2",
|
|
234
|
+
latin: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWE5krw.woff2"
|
|
235
|
+
},
|
|
236
|
+
"500": {
|
|
237
|
+
adlam: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCxkr1ap.woff2",
|
|
238
|
+
"canadian-aboriginal": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWGFkr1ap.woff2",
|
|
239
|
+
cherokee: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWF1kr1ap.woff2",
|
|
240
|
+
math: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWDJkr1ap.woff2",
|
|
241
|
+
"old-permic": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCJkr1ap.woff2",
|
|
242
|
+
symbols: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCBkr1ap.woff2",
|
|
243
|
+
symbols2: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWPRFimuQpw.woff2",
|
|
244
|
+
syriac: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWD1kr1ap.woff2",
|
|
245
|
+
vietnamese: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWEFkr1ap.woff2",
|
|
246
|
+
"latin-ext": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWEBkr1ap.woff2",
|
|
247
|
+
latin: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWE5krw.woff2"
|
|
248
|
+
},
|
|
249
|
+
"600": {
|
|
250
|
+
adlam: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCxkr1ap.woff2",
|
|
251
|
+
"canadian-aboriginal": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWGFkr1ap.woff2",
|
|
252
|
+
cherokee: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWF1kr1ap.woff2",
|
|
253
|
+
math: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWDJkr1ap.woff2",
|
|
254
|
+
"old-permic": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCJkr1ap.woff2",
|
|
255
|
+
symbols: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCBkr1ap.woff2",
|
|
256
|
+
symbols2: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWPRFimuQpw.woff2",
|
|
257
|
+
syriac: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWD1kr1ap.woff2",
|
|
258
|
+
vietnamese: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWEFkr1ap.woff2",
|
|
259
|
+
"latin-ext": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWEBkr1ap.woff2",
|
|
260
|
+
latin: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWE5krw.woff2"
|
|
261
|
+
},
|
|
262
|
+
"700": {
|
|
263
|
+
adlam: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCxkr1ap.woff2",
|
|
264
|
+
"canadian-aboriginal": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWGFkr1ap.woff2",
|
|
265
|
+
cherokee: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWF1kr1ap.woff2",
|
|
266
|
+
math: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWDJkr1ap.woff2",
|
|
267
|
+
"old-permic": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCJkr1ap.woff2",
|
|
268
|
+
symbols: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCBkr1ap.woff2",
|
|
269
|
+
symbols2: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWPRFimuQpw.woff2",
|
|
270
|
+
syriac: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWD1kr1ap.woff2",
|
|
271
|
+
vietnamese: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWEFkr1ap.woff2",
|
|
272
|
+
"latin-ext": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWEBkr1ap.woff2",
|
|
273
|
+
latin: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWE5krw.woff2"
|
|
274
|
+
},
|
|
275
|
+
"800": {
|
|
276
|
+
adlam: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCxkr1ap.woff2",
|
|
277
|
+
"canadian-aboriginal": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWGFkr1ap.woff2",
|
|
278
|
+
cherokee: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWF1kr1ap.woff2",
|
|
279
|
+
math: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWDJkr1ap.woff2",
|
|
280
|
+
"old-permic": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCJkr1ap.woff2",
|
|
281
|
+
symbols: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWCBkr1ap.woff2",
|
|
282
|
+
symbols2: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWPRFimuQpw.woff2",
|
|
283
|
+
syriac: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWD1kr1ap.woff2",
|
|
284
|
+
vietnamese: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWEFkr1ap.woff2",
|
|
285
|
+
"latin-ext": "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWEBkr1ap.woff2",
|
|
286
|
+
latin: "https://fonts.gstatic.com/s/googlesanscode/v11/pxifyogzv91QhV44Z_GQBHsGf5PuWE5krw.woff2"
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
subsets: [
|
|
291
|
+
"adlam",
|
|
292
|
+
"canadian-aboriginal",
|
|
293
|
+
"cherokee",
|
|
294
|
+
"latin",
|
|
295
|
+
"latin-ext",
|
|
296
|
+
"math",
|
|
297
|
+
"old-permic",
|
|
298
|
+
"symbols",
|
|
299
|
+
"symbols2",
|
|
300
|
+
"syriac",
|
|
301
|
+
"vietnamese"
|
|
302
|
+
]
|
|
303
|
+
});
|
|
304
|
+
var fontFamily = "Google Sans Code";
|
|
305
|
+
var loadFont = (style, options) => {
|
|
306
|
+
return loadFonts(getInfo(), style, options);
|
|
307
|
+
};
|
|
308
|
+
export {
|
|
309
|
+
loadFont,
|
|
310
|
+
getInfo,
|
|
311
|
+
fontFamily
|
|
312
|
+
};
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// src/base.ts
|
|
2
|
+
import { continueRender, delayRender } from "remotion";
|
|
3
|
+
import { NoReactInternals } from "remotion/no-react";
|
|
4
|
+
var loadedFonts = {};
|
|
5
|
+
var withResolvers = function() {
|
|
6
|
+
let resolve;
|
|
7
|
+
let reject;
|
|
8
|
+
const promise = new Promise((res, rej) => {
|
|
9
|
+
resolve = res;
|
|
10
|
+
reject = rej;
|
|
11
|
+
});
|
|
12
|
+
return { promise, resolve, reject };
|
|
13
|
+
};
|
|
14
|
+
var loadFontFaceOrTimeoutAfter20Seconds = (fontFace) => {
|
|
15
|
+
const timeout = withResolvers();
|
|
16
|
+
const int = setTimeout(() => {
|
|
17
|
+
timeout.reject(new Error("Timed out loading Google Font"));
|
|
18
|
+
}, 18000);
|
|
19
|
+
return Promise.race([
|
|
20
|
+
fontFace.load().then(() => {
|
|
21
|
+
clearTimeout(int);
|
|
22
|
+
}),
|
|
23
|
+
timeout.promise
|
|
24
|
+
]);
|
|
25
|
+
};
|
|
26
|
+
var loadFonts = (meta, style, options) => {
|
|
27
|
+
const weightsAndSubsetsAreSpecified = Array.isArray(options?.weights) && Array.isArray(options?.subsets) && options.weights.length > 0 && options.subsets.length > 0;
|
|
28
|
+
if (NoReactInternals.ENABLE_V5_BREAKING_CHANGES && !weightsAndSubsetsAreSpecified) {
|
|
29
|
+
throw new Error("Loading Google Fonts without specifying weights and subsets is not supported in Remotion v5. Please specify the weights and subsets you need.");
|
|
30
|
+
}
|
|
31
|
+
const promises = [];
|
|
32
|
+
const styles = style ? [style] : Object.keys(meta.fonts);
|
|
33
|
+
let fontsLoaded = 0;
|
|
34
|
+
for (const style2 of styles) {
|
|
35
|
+
if (typeof FontFace === "undefined") {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
if (!meta.fonts[style2]) {
|
|
39
|
+
throw new Error(`The font ${meta.fontFamily} does not have a style ${style2}`);
|
|
40
|
+
}
|
|
41
|
+
const weights = options?.weights ?? Object.keys(meta.fonts[style2]);
|
|
42
|
+
for (const weight of weights) {
|
|
43
|
+
if (!meta.fonts[style2][weight]) {
|
|
44
|
+
throw new Error(`The font ${meta.fontFamily} does not have a weight ${weight} in style ${style2}`);
|
|
45
|
+
}
|
|
46
|
+
const subsets = options?.subsets ?? Object.keys(meta.fonts[style2][weight]);
|
|
47
|
+
for (const subset of subsets) {
|
|
48
|
+
let font = meta.fonts[style2]?.[weight]?.[subset];
|
|
49
|
+
if (!font) {
|
|
50
|
+
throw new Error(`weight: ${weight} subset: ${subset} is not available for '${meta.fontFamily}'`);
|
|
51
|
+
}
|
|
52
|
+
let fontKey = `${meta.fontFamily}-${style2}-${weight}-${subset}`;
|
|
53
|
+
const previousPromise = loadedFonts[fontKey];
|
|
54
|
+
if (previousPromise) {
|
|
55
|
+
promises.push(previousPromise);
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const baseLabel = `Fetching ${meta.fontFamily} font ${JSON.stringify({
|
|
59
|
+
style: style2,
|
|
60
|
+
weight,
|
|
61
|
+
subset
|
|
62
|
+
})}`;
|
|
63
|
+
const label = weightsAndSubsetsAreSpecified ? baseLabel : `${baseLabel}. This might be caused by loading too many font variations. Read more: https://www.remotion.dev/docs/troubleshooting/font-loading-errors#render-timeout-when-loading-google-fonts`;
|
|
64
|
+
const handle = delayRender(label, { timeoutInMilliseconds: 60000 });
|
|
65
|
+
fontsLoaded++;
|
|
66
|
+
const fontFace = new FontFace(meta.fontFamily, `url(${font}) format('woff2')`, {
|
|
67
|
+
weight,
|
|
68
|
+
style: style2,
|
|
69
|
+
unicodeRange: meta.unicodeRanges[subset]
|
|
70
|
+
});
|
|
71
|
+
let attempts = 2;
|
|
72
|
+
const tryToLoad = () => {
|
|
73
|
+
if (fontFace.status === "loaded") {
|
|
74
|
+
continueRender(handle);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const promise = loadFontFaceOrTimeoutAfter20Seconds(fontFace).then(() => {
|
|
78
|
+
(options?.document ?? document).fonts.add(fontFace);
|
|
79
|
+
continueRender(handle);
|
|
80
|
+
}).catch((err) => {
|
|
81
|
+
loadedFonts[fontKey] = undefined;
|
|
82
|
+
if (attempts === 0) {
|
|
83
|
+
throw err;
|
|
84
|
+
} else {
|
|
85
|
+
attempts--;
|
|
86
|
+
tryToLoad();
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
loadedFonts[fontKey] = promise;
|
|
90
|
+
promises.push(promise);
|
|
91
|
+
};
|
|
92
|
+
tryToLoad();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (fontsLoaded > 20) {
|
|
96
|
+
console.warn(`Made ${fontsLoaded} network requests to load fonts for ${meta.fontFamily}. Consider loading fewer weights and subsets by passing options to loadFont(). Disable this warning by passing "ignoreTooManyRequestsWarning: true" to "options".`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
fontFamily: meta.fontFamily,
|
|
101
|
+
fonts: meta.fonts,
|
|
102
|
+
unicodeRanges: meta.unicodeRanges,
|
|
103
|
+
waitUntilDone: () => Promise.all(promises).then(() => {
|
|
104
|
+
return;
|
|
105
|
+
})
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
// src/IntelOneMono.ts
|
|
110
|
+
var getInfo = () => ({
|
|
111
|
+
fontFamily: "Intel One Mono",
|
|
112
|
+
importName: "IntelOneMono",
|
|
113
|
+
version: "v2",
|
|
114
|
+
url: "https://fonts.googleapis.com/css2?family=Intel+One+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700",
|
|
115
|
+
unicodeRanges: {
|
|
116
|
+
symbols2: "U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F",
|
|
117
|
+
vietnamese: "U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB",
|
|
118
|
+
"latin-ext": "U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF",
|
|
119
|
+
latin: "U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"
|
|
120
|
+
},
|
|
121
|
+
fonts: {
|
|
122
|
+
italic: {
|
|
123
|
+
"300": {
|
|
124
|
+
symbols2: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abSn3wXqO5y6WSQ.woff2",
|
|
125
|
+
vietnamese: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abSn3wVfGrmHYA.woff2",
|
|
126
|
+
"latin-ext": "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abSn3wVeGrmHYA.woff2",
|
|
127
|
+
latin: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abSn3wVQGrk.woff2"
|
|
128
|
+
},
|
|
129
|
+
"400": {
|
|
130
|
+
symbols2: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abT53wXqO5y6WSQ.woff2",
|
|
131
|
+
vietnamese: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abT53wVfGrmHYA.woff2",
|
|
132
|
+
"latin-ext": "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abT53wVeGrmHYA.woff2",
|
|
133
|
+
latin: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abT53wVQGrk.woff2"
|
|
134
|
+
},
|
|
135
|
+
"500": {
|
|
136
|
+
symbols2: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abTL3wXqO5y6WSQ.woff2",
|
|
137
|
+
vietnamese: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abTL3wVfGrmHYA.woff2",
|
|
138
|
+
"latin-ext": "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abTL3wVeGrmHYA.woff2",
|
|
139
|
+
latin: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abTL3wVQGrk.woff2"
|
|
140
|
+
},
|
|
141
|
+
"600": {
|
|
142
|
+
symbols2: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abQn2AXqO5y6WSQ.woff2",
|
|
143
|
+
vietnamese: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abQn2AVfGrmHYA.woff2",
|
|
144
|
+
"latin-ext": "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abQn2AVeGrmHYA.woff2",
|
|
145
|
+
latin: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abQn2AVQGrk.woff2"
|
|
146
|
+
},
|
|
147
|
+
"700": {
|
|
148
|
+
symbols2: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abQe2AXqO5y6WSQ.woff2",
|
|
149
|
+
vietnamese: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abQe2AVfGrmHYA.woff2",
|
|
150
|
+
"latin-ext": "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abQe2AVeGrmHYA.woff2",
|
|
151
|
+
latin: "https://fonts.gstatic.com/s/intelonemono/v2/P5sUzZuLY8Lb_G1RikFkwPjBvsk1H4RE8-pZ5gQ1abQe2AVQGrk.woff2"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
normal: {
|
|
155
|
+
"300": {
|
|
156
|
+
symbols2: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMg__chIRR3P4S-.woff2",
|
|
157
|
+
vietnamese: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMg__chlDVSAr0.woff2",
|
|
158
|
+
"latin-ext": "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMg__chlTVSAr0.woff2",
|
|
159
|
+
latin: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMg__chmzVS.woff2"
|
|
160
|
+
},
|
|
161
|
+
"400": {
|
|
162
|
+
symbols2: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgofchIRR3P4S-.woff2",
|
|
163
|
+
vietnamese: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgofchlDVSAr0.woff2",
|
|
164
|
+
"latin-ext": "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgofchlTVSAr0.woff2",
|
|
165
|
+
latin: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgofchmzVS.woff2"
|
|
166
|
+
},
|
|
167
|
+
"500": {
|
|
168
|
+
symbols2: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgk_chIRR3P4S-.woff2",
|
|
169
|
+
vietnamese: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgk_chlDVSAr0.woff2",
|
|
170
|
+
"latin-ext": "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgk_chlTVSAr0.woff2",
|
|
171
|
+
latin: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgk_chmzVS.woff2"
|
|
172
|
+
},
|
|
173
|
+
"600": {
|
|
174
|
+
symbols2: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgf_AhIRR3P4S-.woff2",
|
|
175
|
+
vietnamese: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgf_AhlDVSAr0.woff2",
|
|
176
|
+
"latin-ext": "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgf_AhlTVSAr0.woff2",
|
|
177
|
+
latin: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgf_AhmzVS.woff2"
|
|
178
|
+
},
|
|
179
|
+
"700": {
|
|
180
|
+
symbols2: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgRvAhIRR3P4S-.woff2",
|
|
181
|
+
vietnamese: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgRvAhlDVSAr0.woff2",
|
|
182
|
+
"latin-ext": "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgRvAhlTVSAr0.woff2",
|
|
183
|
+
latin: "https://fonts.gstatic.com/s/intelonemono/v2/P5sWzZuLY8Lb_G1RikFkwPjBvuM8LXucmoHDSAMgRvAhmzVS.woff2"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
subsets: ["latin", "latin-ext", "symbols2", "vietnamese"]
|
|
188
|
+
});
|
|
189
|
+
var fontFamily = "Intel One Mono";
|
|
190
|
+
var loadFont = (style, options) => {
|
|
191
|
+
return loadFonts(getInfo(), style, options);
|
|
192
|
+
};
|
|
193
|
+
export {
|
|
194
|
+
loadFont,
|
|
195
|
+
getInfo,
|
|
196
|
+
fontFamily
|
|
197
|
+
};
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1034,11 +1034,36 @@ export const getAvailableFonts = () => [
|
|
|
1034
1034
|
importName: 'Biryani',
|
|
1035
1035
|
load: () => import('./Biryani.mjs'),
|
|
1036
1036
|
},
|
|
1037
|
+
{
|
|
1038
|
+
fontFamily: 'Bitcount',
|
|
1039
|
+
importName: 'Bitcount',
|
|
1040
|
+
load: () => import('./Bitcount.mjs'),
|
|
1041
|
+
},
|
|
1037
1042
|
{
|
|
1038
1043
|
fontFamily: 'Bitcount Grid Double',
|
|
1039
1044
|
importName: 'BitcountGridDouble',
|
|
1040
1045
|
load: () => import('./BitcountGridDouble.mjs'),
|
|
1041
1046
|
},
|
|
1047
|
+
{
|
|
1048
|
+
fontFamily: 'Bitcount Grid Single',
|
|
1049
|
+
importName: 'BitcountGridSingle',
|
|
1050
|
+
load: () => import('./BitcountGridSingle.mjs'),
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
fontFamily: 'Bitcount Prop Double',
|
|
1054
|
+
importName: 'BitcountPropDouble',
|
|
1055
|
+
load: () => import('./BitcountPropDouble.mjs'),
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
fontFamily: 'Bitcount Prop Single',
|
|
1059
|
+
importName: 'BitcountPropSingle',
|
|
1060
|
+
load: () => import('./BitcountPropSingle.mjs'),
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
fontFamily: 'Bitcount Single',
|
|
1064
|
+
importName: 'BitcountSingle',
|
|
1065
|
+
load: () => import('./BitcountSingle.mjs'),
|
|
1066
|
+
},
|
|
1042
1067
|
{
|
|
1043
1068
|
fontFamily: 'Bitter',
|
|
1044
1069
|
importName: 'Bitter',
|
|
@@ -2754,6 +2779,11 @@ export const getAvailableFonts = () => [
|
|
|
2754
2779
|
importName: 'GolosText',
|
|
2755
2780
|
load: () => import('./GolosText.mjs'),
|
|
2756
2781
|
},
|
|
2782
|
+
{
|
|
2783
|
+
fontFamily: 'Google Sans Code',
|
|
2784
|
+
importName: 'GoogleSansCode',
|
|
2785
|
+
load: () => import('./GoogleSansCode.mjs'),
|
|
2786
|
+
},
|
|
2757
2787
|
{
|
|
2758
2788
|
fontFamily: 'Gorditas',
|
|
2759
2789
|
importName: 'Gorditas',
|
|
@@ -3264,6 +3294,11 @@ export const getAvailableFonts = () => [
|
|
|
3264
3294
|
importName: 'InstrumentSerif',
|
|
3265
3295
|
load: () => import('./InstrumentSerif.mjs'),
|
|
3266
3296
|
},
|
|
3297
|
+
{
|
|
3298
|
+
fontFamily: 'Intel One Mono',
|
|
3299
|
+
importName: 'IntelOneMono',
|
|
3300
|
+
load: () => import('./IntelOneMono.mjs'),
|
|
3301
|
+
},
|
|
3267
3302
|
{
|
|
3268
3303
|
fontFamily: 'Inter',
|
|
3269
3304
|
importName: 'Inter',
|