expo-font 13.2.2 → 13.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/CHANGELOG.md +12 -0
- package/android/build.gradle +2 -2
- package/build/memory.d.ts.map +1 -1
- package/build/memory.js +6 -0
- package/build/memory.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.font/{13.2.2/expo.modules.font-13.2.2.module → 13.3.1/expo.modules.font-13.3.1.module} +7 -7
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.3.1/expo.modules.font-13.3.1.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.3.1/expo.modules.font-13.3.1.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.3.1/expo.modules.font-13.3.1.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.3.1/expo.modules.font-13.3.1.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.font/{13.2.2/expo.modules.font-13.2.2.pom → 13.3.1/expo.modules.font-13.3.1.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.3.1/expo.modules.font-13.3.1.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.3.1/expo.modules.font-13.3.1.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.3.1/expo.modules.font-13.3.1.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.3.1/expo.modules.font-13.3.1.pom.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.font/maven-metadata.xml +4 -4
- package/local-maven-repo/host/exp/exponent/expo.modules.font/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.font/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.font/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.font/maven-metadata.xml.sha512 +1 -1
- package/package.json +5 -3
- package/plugin/build/utils.d.ts +1 -0
- package/plugin/build/utils.js +12 -0
- package/plugin/build/withFonts.d.ts +10 -1
- package/plugin/build/withFontsAndroid.d.ts +23 -1
- package/plugin/build/withFontsAndroid.js +109 -6
- package/plugin/src/utils.ts +14 -0
- package/plugin/src/withFonts.ts +12 -1
- package/plugin/src/withFontsAndroid.ts +157 -11
- package/src/memory.ts +8 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.2.2/expo.modules.font-13.2.2.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.2.2/expo.modules.font-13.2.2.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.2.2/expo.modules.font-13.2.2.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.2.2/expo.modules.font-13.2.2.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.2.2/expo.modules.font-13.2.2.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.2.2/expo.modules.font-13.2.2.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.2.2/expo.modules.font-13.2.2.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.font/13.2.2/expo.modules.font-13.2.2.pom.sha512 +0 -1
- /package/local-maven-repo/host/exp/exponent/expo.modules.font/{13.2.2/expo.modules.font-13.2.2-sources.jar → 13.3.1/expo.modules.font-13.3.1-sources.jar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.font/{13.2.2/expo.modules.font-13.2.2-sources.jar.md5 → 13.3.1/expo.modules.font-13.3.1-sources.jar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.font/{13.2.2/expo.modules.font-13.2.2-sources.jar.sha1 → 13.3.1/expo.modules.font-13.3.1-sources.jar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.font/{13.2.2/expo.modules.font-13.2.2-sources.jar.sha256 → 13.3.1/expo.modules.font-13.3.1-sources.jar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.font/{13.2.2/expo.modules.font-13.2.2-sources.jar.sha512 → 13.3.1/expo.modules.font-13.3.1-sources.jar.sha512} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.font/{13.2.2/expo.modules.font-13.2.2.aar → 13.3.1/expo.modules.font-13.3.1.aar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.font/{13.2.2/expo.modules.font-13.2.2.aar.md5 → 13.3.1/expo.modules.font-13.3.1.aar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.font/{13.2.2/expo.modules.font-13.2.2.aar.sha1 → 13.3.1/expo.modules.font-13.3.1.aar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.font/{13.2.2/expo.modules.font-13.2.2.aar.sha256 → 13.3.1/expo.modules.font-13.3.1.aar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.font/{13.2.2/expo.modules.font-13.2.2.aar.sha512 → 13.3.1/expo.modules.font-13.3.1.aar.sha512} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,18 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 13.3.1 — 2025-05-02
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Bail out early when `getLoadedFonts` returns an empty array. ([#36586](https://github.com/expo/expo/pull/36586) by [@brentvatne](https://github.com/brentvatne))
|
|
18
|
+
|
|
19
|
+
## 13.3.0 — 2025-04-30
|
|
20
|
+
|
|
21
|
+
### 🎉 New features
|
|
22
|
+
|
|
23
|
+
- [Android] Added support for font weight styles (through XML font definitions) to config plugin. ([#26082](https://github.com/expo/expo/pull/26082) by [@jongbelegen](https://github.com/jongbelegen))
|
|
24
|
+
|
|
13
25
|
## 13.2.2 — 2025-04-25
|
|
14
26
|
|
|
15
27
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
package/build/memory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../src/memory.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAO,CAAC;AAKlE,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,QAE5C;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../src/memory.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAO,CAAC;AAKlE,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,QAE5C;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAkB1D;AAED,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAEjE;AAED,wBAAgB,UAAU,IAAI,IAAI,CAEjC"}
|
package/build/memory.js
CHANGED
|
@@ -14,6 +14,12 @@ export function isLoadedNative(fontFamily) {
|
|
|
14
14
|
}
|
|
15
15
|
else {
|
|
16
16
|
const loadedNativeFonts = ExpoFontLoader.getLoadedFonts();
|
|
17
|
+
// NOTE(brentvatne): Bail out here if there are no loaded fonts. This
|
|
18
|
+
// is functionally equivalent to the behavior below if the returned array
|
|
19
|
+
// is empty, but this handles improper mocking of `getLoadedFonts`.
|
|
20
|
+
if (!loadedNativeFonts?.length) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
17
23
|
loadedNativeFonts.forEach((font) => {
|
|
18
24
|
cache[font] = true;
|
|
19
25
|
});
|
package/build/memory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../src/memory.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,MAAM,YAAY,GAAsC,EAAE,CAAC;AAElE,8EAA8E;AAC9E,IAAI,KAAK,GAAgC,EAAE,CAAC;AAE5C,MAAM,UAAU,UAAU,CAAC,UAAkB;IAC3C,KAAK,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,UAAkB;IAChD,OAAO,UAAU,IAAI,KAAK,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,IAAI,eAAe,CAAC,UAAU,CAAC,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,CAAC;QACN,MAAM,iBAAiB,GAAa,cAAc,CAAC,cAAc,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../src/memory.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,MAAM,YAAY,GAAsC,EAAE,CAAC;AAElE,8EAA8E;AAC9E,IAAI,KAAK,GAAgC,EAAE,CAAC;AAE5C,MAAM,UAAU,UAAU,CAAC,UAAkB;IAC3C,KAAK,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,UAAkB;IAChD,OAAO,UAAU,IAAI,KAAK,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,IAAI,eAAe,CAAC,UAAU,CAAC,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,CAAC;QACN,MAAM,iBAAiB,GAAa,cAAc,CAAC,cAAc,EAAE,CAAC;QAEpE,qEAAqE;QACrE,yEAAyE;QACzE,mEAAmE;QACnE,IAAI,CAAC,iBAAiB,EAAE,MAAM,EAAE,CAAC;YAC/B,OAAO,KAAK,CAAC;QACf,CAAC;QAED,iBAAiB,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACjC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;QACrB,CAAC,CAAC,CAAC;QACH,OAAO,UAAU,IAAI,KAAK,CAAC;IAC7B,CAAC;AACH,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,UAAkB;IACzD,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,KAAK,GAAG,EAAE,CAAC;AACb,CAAC","sourcesContent":["import ExpoFontLoader from './ExpoFontLoader';\n\nexport const loadPromises: { [name: string]: Promise<void> } = {};\n\n// cache the value on the js side for fast access to the fonts that are loaded\nlet cache: { [name: string]: boolean } = {};\n\nexport function markLoaded(fontFamily: string) {\n cache[fontFamily] = true;\n}\n\nexport function isLoadedInCache(fontFamily: string): boolean {\n return fontFamily in cache;\n}\n\nexport function isLoadedNative(fontFamily: string): boolean {\n if (isLoadedInCache(fontFamily)) {\n return true;\n } else {\n const loadedNativeFonts: string[] = ExpoFontLoader.getLoadedFonts();\n\n // NOTE(brentvatne): Bail out here if there are no loaded fonts. This\n // is functionally equivalent to the behavior below if the returned array\n // is empty, but this handles improper mocking of `getLoadedFonts`.\n if (!loadedNativeFonts?.length) {\n return false;\n }\n\n loadedNativeFonts.forEach((font) => {\n cache[font] = true;\n });\n return fontFamily in cache;\n }\n}\n\nexport function purgeFontFamilyFromCache(fontFamily: string): void {\n delete cache[fontFamily];\n}\n\nexport function purgeCache(): void {\n cache = {};\n}\n"]}
|
package/expo-module.config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "host.exp.exponent",
|
|
5
5
|
"module": "expo.modules.font",
|
|
6
|
-
"version": "13.
|
|
6
|
+
"version": "13.3.1",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.font-13.
|
|
28
|
-
"url": "expo.modules.font-13.
|
|
27
|
+
"name": "expo.modules.font-13.3.1.aar",
|
|
28
|
+
"url": "expo.modules.font-13.3.1.aar",
|
|
29
29
|
"size": 24048,
|
|
30
30
|
"sha512": "68cf441a11928d7286379f1985698bdf3925a0dfd852a168968a955f21e32b1d95f1a65a330be805cee8b464cab97ff03a15ad7df77fef45aa25de193ca5b259",
|
|
31
31
|
"sha256": "5274e21b1ff612d9defa01130a701dee5a7c2459b06d7a54b49d0b843d601120",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
],
|
|
58
58
|
"files": [
|
|
59
59
|
{
|
|
60
|
-
"name": "expo.modules.font-13.
|
|
61
|
-
"url": "expo.modules.font-13.
|
|
60
|
+
"name": "expo.modules.font-13.3.1.aar",
|
|
61
|
+
"url": "expo.modules.font-13.3.1.aar",
|
|
62
62
|
"size": 24048,
|
|
63
63
|
"sha512": "68cf441a11928d7286379f1985698bdf3925a0dfd852a168968a955f21e32b1d95f1a65a330be805cee8b464cab97ff03a15ad7df77fef45aa25de193ca5b259",
|
|
64
64
|
"sha256": "5274e21b1ff612d9defa01130a701dee5a7c2459b06d7a54b49d0b843d601120",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
},
|
|
78
78
|
"files": [
|
|
79
79
|
{
|
|
80
|
-
"name": "expo.modules.font-13.
|
|
81
|
-
"url": "expo.modules.font-13.
|
|
80
|
+
"name": "expo.modules.font-13.3.1-sources.jar",
|
|
81
|
+
"url": "expo.modules.font-13.3.1-sources.jar",
|
|
82
82
|
"size": 3643,
|
|
83
83
|
"sha512": "04d8003327d266d74c7c2123206ff0c008db185c4fe9ce8518e6c47af1ed8d3118db35e094ceb19451c622318ac15e9fa9eaea609d7fae69cedec95e1656c20a",
|
|
84
84
|
"sha256": "c029366141433ab312f41026590eb119ef648137f3b6cebeb416531fc0b4cccc",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f3e81f184e30c3231a33561acb00d7b1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2deed22f48a94a8beabfb6aa00cc973ffb81e963
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
34f1703f7773b41917d37a7870b185613099323365667167142aa6322d4c505e
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a00ab256f2f2d67f266a6db1a50aea9eadf4f0a588930796571cd94d5140263bd564054ed16e0ca56fc9239acb747f132662ca8f0dd9cc55b728348428167c5e
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>host.exp.exponent</groupId>
|
|
11
11
|
<artifactId>expo.modules.font</artifactId>
|
|
12
|
-
<version>13.
|
|
12
|
+
<version>13.3.1</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.font</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
package/local-maven-repo/host/exp/exponent/expo.modules.font/13.3.1/expo.modules.font-13.3.1.pom.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
eb5eccb96a2315de3539fbdafc7a1cf8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9fc18b0c4078ed24d9d35a80744550b9c58cb48a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a2eef95152116c5fe91674a3827f084261df83ff6a18a25707bdbba7d7e95e53
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bad17eaeabe9b7024e683c6ecc1c55e885bad0601ab304de4d5ecc5a631cfca27f3374531848efe506abc1698f719a838ba1d75c26c4fa9d3e1d2b99851e491c
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>host.exp.exponent</groupId>
|
|
4
4
|
<artifactId>expo.modules.font</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>13.
|
|
7
|
-
<release>13.
|
|
6
|
+
<latest>13.3.1</latest>
|
|
7
|
+
<release>13.3.1</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>13.
|
|
9
|
+
<version>13.3.1</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20250502214648</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
9ba2af880d4790bcccdae3bb676e35c6
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
e83cfc06cb24b29b09be58f9caa0e26876ba824d
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
92854b3cb2d9c85e219e73a361349e2f14412159aa34d1dc281ec996cde9e2a4
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
7dfea10723592da7cf13ae86a670e87cbe6ca1611c65c2039caaa83e135beaf100efd6d626a656229f4e5e50632f962945f959a1e2fad7e5278686c2d2e6ef77
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-font",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.3.1",
|
|
4
4
|
"description": "Load fonts at runtime and use them in React Native components.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
"clean": "expo-module clean",
|
|
11
11
|
"lint": "expo-module lint",
|
|
12
12
|
"test": "expo-module test",
|
|
13
|
+
"build:plugin": "expo-module build plugin",
|
|
14
|
+
"test:plugin": "expo-module test plugin",
|
|
13
15
|
"test:rsc": "jest --config jest-rsc.config.js",
|
|
14
16
|
"prepare": "expo-module prepare",
|
|
15
17
|
"prepublishOnly": "expo-module prepublishOnly",
|
|
@@ -50,11 +52,11 @@
|
|
|
50
52
|
"devDependencies": {
|
|
51
53
|
"@testing-library/react-native": "^13.1.0",
|
|
52
54
|
"@types/fontfaceobserver": "^2.1.3",
|
|
53
|
-
"expo-module-scripts": "^4.1.
|
|
55
|
+
"expo-module-scripts": "^4.1.6"
|
|
54
56
|
},
|
|
55
57
|
"peerDependencies": {
|
|
56
58
|
"expo": "*",
|
|
57
59
|
"react": "*"
|
|
58
60
|
},
|
|
59
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "5c98e5ee7c577209319bf91f515e65e256641d9c"
|
|
60
62
|
}
|
package/plugin/build/utils.d.ts
CHANGED
package/plugin/build/utils.js
CHANGED
|
@@ -3,9 +3,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.toValidAndroidResourceName = toValidAndroidResourceName;
|
|
6
7
|
exports.resolveFontPaths = resolveFontPaths;
|
|
7
8
|
const promises_1 = __importDefault(require("fs/promises"));
|
|
8
9
|
const path_1 = __importDefault(require("path"));
|
|
10
|
+
// rule: File-based resource names must contain only lowercase a-z, 0-9, or underscore
|
|
11
|
+
function toValidAndroidResourceName(value) {
|
|
12
|
+
const valueWithoutFileExtension = path_1.default.parse(value).name;
|
|
13
|
+
const withUnderscores = valueWithoutFileExtension
|
|
14
|
+
.replace(/([a-z])([A-Z])/g, '$1_$2')
|
|
15
|
+
.replace(/([A-Z])([A-Z][a-z])/g, '$1_$2');
|
|
16
|
+
return withUnderscores
|
|
17
|
+
.toLowerCase()
|
|
18
|
+
.replace(/[^a-z0-9]/g, '_')
|
|
19
|
+
.replace(/_+/g, '_');
|
|
20
|
+
}
|
|
9
21
|
async function resolveFontPaths(fonts, projectRoot) {
|
|
10
22
|
const promises = fonts.map(async (p) => {
|
|
11
23
|
const resolvedPath = path_1.default.resolve(projectRoot, p);
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { type ConfigPlugin } from 'expo/config-plugins';
|
|
2
|
+
export type FontObject = {
|
|
3
|
+
fontFamily: string;
|
|
4
|
+
fontDefinitions: {
|
|
5
|
+
path: string;
|
|
6
|
+
weight: number;
|
|
7
|
+
style?: 'normal' | 'italic' | undefined;
|
|
8
|
+
}[];
|
|
9
|
+
};
|
|
10
|
+
export type Font = string | FontObject;
|
|
2
11
|
export type FontProps = {
|
|
3
12
|
fonts?: string[];
|
|
4
13
|
android?: {
|
|
5
|
-
fonts?:
|
|
14
|
+
fonts?: Font[];
|
|
6
15
|
};
|
|
7
16
|
ios?: {
|
|
8
17
|
fonts?: string[];
|
|
@@ -1,2 +1,24 @@
|
|
|
1
1
|
import { type ConfigPlugin } from 'expo/config-plugins';
|
|
2
|
-
|
|
2
|
+
import type { Font, FontObject } from './withFonts';
|
|
3
|
+
export declare const withFontsAndroid: ConfigPlugin<Font[]>;
|
|
4
|
+
type GroupedFontObject = Record<string, FontObject['fontDefinitions']>;
|
|
5
|
+
export declare function groupByFamily(array: FontObject[]): GroupedFontObject;
|
|
6
|
+
export declare function getXmlSpecs(fontsDir: string, xmlFontObjects: GroupedFontObject): {
|
|
7
|
+
path: string;
|
|
8
|
+
xml: {
|
|
9
|
+
'font-family': {
|
|
10
|
+
$: {
|
|
11
|
+
'xmlns:app': string;
|
|
12
|
+
};
|
|
13
|
+
font: {
|
|
14
|
+
$: {
|
|
15
|
+
'app:font': string;
|
|
16
|
+
'app:fontStyle': "normal" | "italic";
|
|
17
|
+
'app:fontWeight': string;
|
|
18
|
+
};
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}[];
|
|
23
|
+
export declare function generateFontManagerCalls(xmlFontObjects: GroupedFontObject, language: 'java' | 'kt'): string[];
|
|
24
|
+
export {};
|
|
@@ -4,19 +4,123 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.withFontsAndroid = void 0;
|
|
7
|
+
exports.groupByFamily = groupByFamily;
|
|
8
|
+
exports.getXmlSpecs = getXmlSpecs;
|
|
9
|
+
exports.generateFontManagerCalls = generateFontManagerCalls;
|
|
10
|
+
const codeMod_1 = require("@expo/config-plugins/build/android/codeMod");
|
|
11
|
+
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
|
|
7
12
|
const config_plugins_1 = require("expo/config-plugins");
|
|
8
13
|
const promises_1 = __importDefault(require("fs/promises"));
|
|
14
|
+
const os_1 = __importDefault(require("os"));
|
|
9
15
|
const path_1 = __importDefault(require("path"));
|
|
10
16
|
const utils_1 = require("./utils");
|
|
17
|
+
const assetsFontsFir = 'app/src/main/assets/fonts';
|
|
18
|
+
const resourcesFontsDir = 'app/src/main/res/font';
|
|
11
19
|
const withFontsAndroid = (config, fonts) => {
|
|
20
|
+
const assetFontPaths = fonts.filter((it) => typeof it === 'string');
|
|
21
|
+
config = copyFontsToDir(config, assetFontPaths, assetsFontsFir);
|
|
22
|
+
const xmlFonts = fonts.filter((it) => typeof it === 'object');
|
|
23
|
+
config = addXmlFonts(config, xmlFonts);
|
|
24
|
+
return config;
|
|
25
|
+
};
|
|
26
|
+
exports.withFontsAndroid = withFontsAndroid;
|
|
27
|
+
function groupByFamily(array) {
|
|
28
|
+
return array.reduce((result, item) => {
|
|
29
|
+
const keyValue = item['fontFamily'];
|
|
30
|
+
result[keyValue] ||= [];
|
|
31
|
+
result[keyValue].push(...item.fontDefinitions);
|
|
32
|
+
return result;
|
|
33
|
+
}, {});
|
|
34
|
+
}
|
|
35
|
+
function addXmlFonts(config, xmlFontObjects) {
|
|
36
|
+
const fontsByFamily = groupByFamily(xmlFontObjects);
|
|
37
|
+
const fontPaths = Object.values(fontsByFamily)
|
|
38
|
+
.map((font) => font.map((it) => it.path))
|
|
39
|
+
.flat();
|
|
40
|
+
config = copyFontsToDir(config, fontPaths, resourcesFontsDir, (filenameWithExt) => {
|
|
41
|
+
const filename = (0, utils_1.toValidAndroidResourceName)(filenameWithExt);
|
|
42
|
+
const ext = path_1.default.extname(filenameWithExt);
|
|
43
|
+
return `${filename}${ext}`;
|
|
44
|
+
});
|
|
45
|
+
config = addFontXmlToMainApplication(config, fontsByFamily);
|
|
46
|
+
return (0, config_plugins_1.withDangerousMod)(config, [
|
|
47
|
+
'android',
|
|
48
|
+
async (config) => {
|
|
49
|
+
const fontsDir = path_1.default.join(config.modRequest.platformProjectRoot, 'app/src/main/res/font');
|
|
50
|
+
const xmlSpecs = getXmlSpecs(fontsDir, fontsByFamily);
|
|
51
|
+
await Promise.all(xmlSpecs.map(config_plugins_1.XML.writeXMLAsync));
|
|
52
|
+
return config;
|
|
53
|
+
},
|
|
54
|
+
]);
|
|
55
|
+
}
|
|
56
|
+
const resourceNameConflictAvoidancePrefix = 'xml_';
|
|
57
|
+
function getXmlSpecs(fontsDir, xmlFontObjects) {
|
|
58
|
+
return Object.entries(xmlFontObjects).map(([fontFamily, fontDefinitions]) => {
|
|
59
|
+
const filePath = path_1.default.join(fontsDir, `${resourceNameConflictAvoidancePrefix + (0, utils_1.toValidAndroidResourceName)(fontFamily)}.xml`);
|
|
60
|
+
// each font family has one xml resource file with potentially multiple font definitions
|
|
61
|
+
// the font files (e.g. ttf) at `path` are copied to res/font
|
|
62
|
+
// with their name changed to be a valid resource and referenced in the xml file
|
|
63
|
+
return {
|
|
64
|
+
path: filePath,
|
|
65
|
+
xml: {
|
|
66
|
+
'font-family': {
|
|
67
|
+
// using `app` namespace for better compat:
|
|
68
|
+
// https://developer.android.com/develop/ui/views/text-and-emoji/fonts-in-xml#using-support-lib
|
|
69
|
+
$: {
|
|
70
|
+
'xmlns:app': 'http://schemas.android.com/apk/res-auto',
|
|
71
|
+
},
|
|
72
|
+
font: fontDefinitions.map((definition) => {
|
|
73
|
+
return {
|
|
74
|
+
$: {
|
|
75
|
+
'app:font': `@font/${(0, utils_1.toValidAndroidResourceName)(definition.path)}`,
|
|
76
|
+
'app:fontStyle': definition.style || 'normal',
|
|
77
|
+
'app:fontWeight': String(definition.weight),
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}),
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function addFontXmlToMainApplication(config, xmlFontObjects) {
|
|
87
|
+
return (0, config_plugins_1.withMainApplication)(config, (config) => {
|
|
88
|
+
const { modResults, modResults: { language }, } = config;
|
|
89
|
+
modResults.contents = (0, codeMod_1.addImports)(modResults.contents, ['com.facebook.react.common.assets.ReactFontManager'], language === 'java');
|
|
90
|
+
const fontManagerCalls = generateFontManagerCalls(xmlFontObjects, language).join(os_1.default.EOL);
|
|
91
|
+
const withInit = (0, generateCode_1.mergeContents)({
|
|
92
|
+
src: modResults.contents,
|
|
93
|
+
comment: ' //',
|
|
94
|
+
tag: 'xml-fonts-init',
|
|
95
|
+
offset: 1,
|
|
96
|
+
anchor: /super\.onCreate\(\)/,
|
|
97
|
+
newSrc: fontManagerCalls,
|
|
98
|
+
});
|
|
99
|
+
return {
|
|
100
|
+
...config,
|
|
101
|
+
modResults: {
|
|
102
|
+
...modResults,
|
|
103
|
+
contents: withInit.contents,
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function generateFontManagerCalls(xmlFontObjects, language) {
|
|
109
|
+
const lineEnding = language === 'java' ? ';' : '';
|
|
110
|
+
const indent = ' ';
|
|
111
|
+
return Object.keys(xmlFontObjects).map((family) => `${indent}ReactFontManager.getInstance().addCustomFont(this, "${family}", R.font.${resourceNameConflictAvoidancePrefix + (0, utils_1.toValidAndroidResourceName)(family)})${lineEnding}`);
|
|
112
|
+
}
|
|
113
|
+
function copyFontsToDir(config, paths, inAppDestination, filenameProcessor = (filenameWithExt) => filenameWithExt) {
|
|
12
114
|
return (0, config_plugins_1.withDangerousMod)(config, [
|
|
13
115
|
'android',
|
|
14
116
|
async (config) => {
|
|
15
|
-
const
|
|
117
|
+
const fontsDir = path_1.default.join(config.modRequest.platformProjectRoot, inAppDestination);
|
|
118
|
+
await promises_1.default.mkdir(fontsDir, { recursive: true });
|
|
119
|
+
const resolvedFonts = await (0, utils_1.resolveFontPaths)(paths, config.modRequest.projectRoot);
|
|
16
120
|
await Promise.all(resolvedFonts.map(async (asset) => {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
const output = path_1.default.join(fontsDir,
|
|
121
|
+
const filenameWithExt = path_1.default.basename(asset);
|
|
122
|
+
const outputFileName = filenameProcessor(filenameWithExt);
|
|
123
|
+
const output = path_1.default.join(fontsDir, outputFileName);
|
|
20
124
|
if (output.endsWith('.ttf') || output.endsWith('.otf')) {
|
|
21
125
|
await promises_1.default.copyFile(asset, output);
|
|
22
126
|
}
|
|
@@ -24,5 +128,4 @@ const withFontsAndroid = (config, fonts) => {
|
|
|
24
128
|
return config;
|
|
25
129
|
},
|
|
26
130
|
]);
|
|
27
|
-
}
|
|
28
|
-
exports.withFontsAndroid = withFontsAndroid;
|
|
131
|
+
}
|
package/plugin/src/utils.ts
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import fs from 'fs/promises';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
|
|
4
|
+
// rule: File-based resource names must contain only lowercase a-z, 0-9, or underscore
|
|
5
|
+
export function toValidAndroidResourceName(value: string) {
|
|
6
|
+
const valueWithoutFileExtension = path.parse(value).name;
|
|
7
|
+
|
|
8
|
+
const withUnderscores = valueWithoutFileExtension
|
|
9
|
+
.replace(/([a-z])([A-Z])/g, '$1_$2')
|
|
10
|
+
.replace(/([A-Z])([A-Z][a-z])/g, '$1_$2');
|
|
11
|
+
|
|
12
|
+
return withUnderscores
|
|
13
|
+
.toLowerCase()
|
|
14
|
+
.replace(/[^a-z0-9]/g, '_')
|
|
15
|
+
.replace(/_+/g, '_');
|
|
16
|
+
}
|
|
17
|
+
|
|
4
18
|
export async function resolveFontPaths(fonts: string[], projectRoot: string) {
|
|
5
19
|
const promises = fonts.map(async (p) => {
|
|
6
20
|
const resolvedPath = path.resolve(projectRoot, p);
|
package/plugin/src/withFonts.ts
CHANGED
|
@@ -5,10 +5,21 @@ import { withFontsIos } from './withFontsIos';
|
|
|
5
5
|
|
|
6
6
|
const pkg = require('expo-font/package.json');
|
|
7
7
|
|
|
8
|
+
export type FontObject = {
|
|
9
|
+
fontFamily: string;
|
|
10
|
+
fontDefinitions: {
|
|
11
|
+
path: string;
|
|
12
|
+
weight: number;
|
|
13
|
+
style?: 'normal' | 'italic' | undefined;
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type Font = string | FontObject;
|
|
18
|
+
|
|
8
19
|
export type FontProps = {
|
|
9
20
|
fonts?: string[];
|
|
10
21
|
android?: {
|
|
11
|
-
fonts?:
|
|
22
|
+
fonts?: Font[];
|
|
12
23
|
};
|
|
13
24
|
ios?: {
|
|
14
25
|
fonts?: string[];
|
|
@@ -1,22 +1,168 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addImports } from '@expo/config-plugins/build/android/codeMod';
|
|
2
|
+
import { mergeContents } from '@expo/config-plugins/build/utils/generateCode';
|
|
3
|
+
import { type ExpoConfig } from '@expo/config-types';
|
|
4
|
+
import { type ConfigPlugin, withDangerousMod, withMainApplication, XML } from 'expo/config-plugins';
|
|
2
5
|
import fs from 'fs/promises';
|
|
6
|
+
import os from 'os';
|
|
3
7
|
import path from 'path';
|
|
4
8
|
|
|
5
|
-
import { resolveFontPaths } from './utils';
|
|
9
|
+
import { resolveFontPaths, toValidAndroidResourceName } from './utils';
|
|
10
|
+
import type { Font, FontObject } from './withFonts';
|
|
11
|
+
|
|
12
|
+
const assetsFontsFir = 'app/src/main/assets/fonts';
|
|
13
|
+
const resourcesFontsDir = 'app/src/main/res/font';
|
|
14
|
+
|
|
15
|
+
export const withFontsAndroid: ConfigPlugin<Font[]> = (config, fonts) => {
|
|
16
|
+
const assetFontPaths = fonts.filter((it) => typeof it === 'string');
|
|
17
|
+
config = copyFontsToDir(config, assetFontPaths, assetsFontsFir);
|
|
18
|
+
|
|
19
|
+
const xmlFonts = fonts.filter((it) => typeof it === 'object');
|
|
20
|
+
config = addXmlFonts(config, xmlFonts);
|
|
21
|
+
|
|
22
|
+
return config;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
type GroupedFontObject = Record<string, FontObject['fontDefinitions']>;
|
|
26
|
+
|
|
27
|
+
export function groupByFamily(array: FontObject[]): GroupedFontObject {
|
|
28
|
+
return array.reduce<GroupedFontObject>((result, item) => {
|
|
29
|
+
const keyValue = item['fontFamily'];
|
|
30
|
+
result[keyValue] ||= [];
|
|
31
|
+
result[keyValue].push(...item.fontDefinitions);
|
|
32
|
+
return result;
|
|
33
|
+
}, {});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function addXmlFonts(config: ExpoConfig, xmlFontObjects: FontObject[]) {
|
|
37
|
+
const fontsByFamily = groupByFamily(xmlFontObjects);
|
|
38
|
+
|
|
39
|
+
const fontPaths = Object.values(fontsByFamily)
|
|
40
|
+
.map((font) => font.map((it) => it.path))
|
|
41
|
+
.flat();
|
|
42
|
+
|
|
43
|
+
config = copyFontsToDir(config, fontPaths, resourcesFontsDir, (filenameWithExt) => {
|
|
44
|
+
const filename = toValidAndroidResourceName(filenameWithExt);
|
|
45
|
+
const ext = path.extname(filenameWithExt);
|
|
46
|
+
return `${filename}${ext}`;
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
config = addFontXmlToMainApplication(config, fontsByFamily);
|
|
6
50
|
|
|
7
|
-
export const withFontsAndroid: ConfigPlugin<string[]> = (config, fonts) => {
|
|
8
51
|
return withDangerousMod(config, [
|
|
9
52
|
'android',
|
|
10
53
|
async (config) => {
|
|
11
|
-
const
|
|
54
|
+
const fontsDir = path.join(config.modRequest.platformProjectRoot, 'app/src/main/res/font');
|
|
55
|
+
|
|
56
|
+
const xmlSpecs = getXmlSpecs(fontsDir, fontsByFamily);
|
|
57
|
+
|
|
58
|
+
await Promise.all(xmlSpecs.map(XML.writeXMLAsync));
|
|
59
|
+
|
|
60
|
+
return config;
|
|
61
|
+
},
|
|
62
|
+
]);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const resourceNameConflictAvoidancePrefix = 'xml_';
|
|
66
|
+
|
|
67
|
+
export function getXmlSpecs(fontsDir: string, xmlFontObjects: GroupedFontObject) {
|
|
68
|
+
return Object.entries(xmlFontObjects).map(([fontFamily, fontDefinitions]) => {
|
|
69
|
+
const filePath = path.join(
|
|
70
|
+
fontsDir,
|
|
71
|
+
`${resourceNameConflictAvoidancePrefix + toValidAndroidResourceName(fontFamily)}.xml`
|
|
72
|
+
);
|
|
73
|
+
// each font family has one xml resource file with potentially multiple font definitions
|
|
74
|
+
// the font files (e.g. ttf) at `path` are copied to res/font
|
|
75
|
+
// with their name changed to be a valid resource and referenced in the xml file
|
|
76
|
+
return {
|
|
77
|
+
path: filePath,
|
|
78
|
+
xml: {
|
|
79
|
+
'font-family': {
|
|
80
|
+
// using `app` namespace for better compat:
|
|
81
|
+
// https://developer.android.com/develop/ui/views/text-and-emoji/fonts-in-xml#using-support-lib
|
|
82
|
+
$: {
|
|
83
|
+
'xmlns:app': 'http://schemas.android.com/apk/res-auto',
|
|
84
|
+
},
|
|
85
|
+
font: fontDefinitions.map((definition) => {
|
|
86
|
+
return {
|
|
87
|
+
$: {
|
|
88
|
+
'app:font': `@font/${toValidAndroidResourceName(definition.path)}`,
|
|
89
|
+
'app:fontStyle': definition.style || 'normal',
|
|
90
|
+
'app:fontWeight': String(definition.weight),
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
}),
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function addFontXmlToMainApplication(config: ExpoConfig, xmlFontObjects: GroupedFontObject) {
|
|
101
|
+
return withMainApplication(config, (config) => {
|
|
102
|
+
const {
|
|
103
|
+
modResults,
|
|
104
|
+
modResults: { language },
|
|
105
|
+
} = config;
|
|
106
|
+
|
|
107
|
+
modResults.contents = addImports(
|
|
108
|
+
modResults.contents,
|
|
109
|
+
['com.facebook.react.common.assets.ReactFontManager'],
|
|
110
|
+
language === 'java'
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
const fontManagerCalls = generateFontManagerCalls(xmlFontObjects, language).join(os.EOL);
|
|
114
|
+
|
|
115
|
+
const withInit = mergeContents({
|
|
116
|
+
src: modResults.contents,
|
|
117
|
+
comment: ' //',
|
|
118
|
+
tag: 'xml-fonts-init',
|
|
119
|
+
offset: 1,
|
|
120
|
+
anchor: /super\.onCreate\(\)/,
|
|
121
|
+
newSrc: fontManagerCalls,
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
...config,
|
|
126
|
+
modResults: {
|
|
127
|
+
...modResults,
|
|
128
|
+
contents: withInit.contents,
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function generateFontManagerCalls(
|
|
135
|
+
xmlFontObjects: GroupedFontObject,
|
|
136
|
+
language: 'java' | 'kt'
|
|
137
|
+
) {
|
|
138
|
+
const lineEnding = language === 'java' ? ';' : '';
|
|
139
|
+
const indent = ' ';
|
|
140
|
+
|
|
141
|
+
return Object.keys(xmlFontObjects).map(
|
|
142
|
+
(family) =>
|
|
143
|
+
`${indent}ReactFontManager.getInstance().addCustomFont(this, "${family}", R.font.${resourceNameConflictAvoidancePrefix + toValidAndroidResourceName(family)})${lineEnding}`
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function copyFontsToDir(
|
|
148
|
+
config: ExpoConfig,
|
|
149
|
+
paths: string[],
|
|
150
|
+
inAppDestination: typeof assetsFontsFir | typeof resourcesFontsDir,
|
|
151
|
+
filenameProcessor = (filenameWithExt: string) => filenameWithExt
|
|
152
|
+
) {
|
|
153
|
+
return withDangerousMod(config, [
|
|
154
|
+
'android',
|
|
155
|
+
async (config) => {
|
|
156
|
+
const fontsDir = path.join(config.modRequest.platformProjectRoot, inAppDestination);
|
|
157
|
+
await fs.mkdir(fontsDir, { recursive: true });
|
|
158
|
+
|
|
159
|
+
const resolvedFonts = await resolveFontPaths(paths, config.modRequest.projectRoot);
|
|
160
|
+
|
|
12
161
|
await Promise.all(
|
|
13
162
|
resolvedFonts.map(async (asset) => {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
);
|
|
18
|
-
await fs.mkdir(fontsDir, { recursive: true });
|
|
19
|
-
const output = path.join(fontsDir, path.basename(asset));
|
|
163
|
+
const filenameWithExt = path.basename(asset);
|
|
164
|
+
const outputFileName = filenameProcessor(filenameWithExt);
|
|
165
|
+
const output = path.join(fontsDir, outputFileName);
|
|
20
166
|
if (output.endsWith('.ttf') || output.endsWith('.otf')) {
|
|
21
167
|
await fs.copyFile(asset, output);
|
|
22
168
|
}
|
|
@@ -25,4 +171,4 @@ export const withFontsAndroid: ConfigPlugin<string[]> = (config, fonts) => {
|
|
|
25
171
|
return config;
|
|
26
172
|
},
|
|
27
173
|
]);
|
|
28
|
-
}
|
|
174
|
+
}
|
package/src/memory.ts
CHANGED
|
@@ -18,6 +18,14 @@ export function isLoadedNative(fontFamily: string): boolean {
|
|
|
18
18
|
return true;
|
|
19
19
|
} else {
|
|
20
20
|
const loadedNativeFonts: string[] = ExpoFontLoader.getLoadedFonts();
|
|
21
|
+
|
|
22
|
+
// NOTE(brentvatne): Bail out here if there are no loaded fonts. This
|
|
23
|
+
// is functionally equivalent to the behavior below if the returned array
|
|
24
|
+
// is empty, but this handles improper mocking of `getLoadedFonts`.
|
|
25
|
+
if (!loadedNativeFonts?.length) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
|
|
21
29
|
loadedNativeFonts.forEach((font) => {
|
|
22
30
|
cache[font] = true;
|
|
23
31
|
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3c3bfab591c6eaf8d55abca917121ceb
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c88aaea1b7039c1983d418beddc284b8ab3972e8
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fb673624fd34af3858128dae2e6fdf26b504ec6472ffe110dac02a0d10acf841
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9e904727080e0c3fdcd3c5b5280ba784e8349ef510b4d3ed5d696a1f859a3285e35f82ce49f201718ccde70de8d4a21d2a4f5e897e9146fee3f1db56fedb0cff
|
package/local-maven-repo/host/exp/exponent/expo.modules.font/13.2.2/expo.modules.font-13.2.2.pom.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f91325cf35afb69a21295ac0b210361b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
dfe68982373a40631ca860831eb9ca5bdf67f41a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
216496eebdbbf9e80a67a329c5384a90616a494c4063744b75e6e5e187fa73eb
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
765424431b2e8be0fbe8d0a259f64a7a823f31885c9717339c375581d8aae0bd79bbeeb3b08975a4fa7369c066d499eb080ceb8bd271a72eb1a3051b1207a75e
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|