@bitbaum/design-tokens 1.3.0 → 1.3.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/next-fonts.mjs +7 -4
- package/package.json +1 -1
package/next-fonts.mjs
CHANGED
|
@@ -94,11 +94,14 @@ export function calls(spec) {
|
|
|
94
94
|
if (!shipped.includes(s))
|
|
95
95
|
throw new Error(`${spec.face} has no subset "${s}"; shipped: ${shipped.join(', ')}`);
|
|
96
96
|
// Google's order is kept, because it decides which file wins a character two
|
|
97
|
-
// subsets both list. The export itself is
|
|
98
|
-
// the first
|
|
99
|
-
//
|
|
97
|
+
// subsets both list. The export itself is latin when latin is declared,
|
|
98
|
+
// else the first preloaded subset, else the first: it is the file measured
|
|
99
|
+
// for the fallback metrics, and a cyrillic file has no latin letters to
|
|
100
|
+
// measure (Inter's gives size-adjust 100% where latin gives 107.89%).
|
|
100
101
|
const ordered = shipped.filter((s) => subsets.includes(s));
|
|
101
|
-
const primary = ordered.
|
|
102
|
+
const primary = ordered.includes('latin')
|
|
103
|
+
? 'latin'
|
|
104
|
+
: (ordered.find((s) => preload.includes(s)) ?? ordered[0]);
|
|
102
105
|
return ordered.map((subset) => {
|
|
103
106
|
const isPrimary = subset === primary;
|
|
104
107
|
const src = [];
|