expo-font 13.0.1 → 13.0.2
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 +6 -0
- package/android/build.gradle +2 -2
- package/ios/FontFamilyAliasManager.swift +14 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 13.0.2 — 2024-12-19
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- [iOS] Fix crash when accessing resource from multiple threads ([#33574](https://github.com/expo/expo/pull/33574) by [@chrfalch](https://github.com/chrfalch))
|
|
18
|
+
|
|
13
19
|
## 13.0.1 — 2024-11-05
|
|
14
20
|
|
|
15
21
|
### 💡 Others
|
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
|
|
3
3
|
group = 'host.exp.exponent'
|
|
4
|
-
version = '13.0.
|
|
4
|
+
version = '13.0.2'
|
|
5
5
|
|
|
6
6
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
7
7
|
apply from: expoModulesCorePlugin
|
|
@@ -14,7 +14,7 @@ android {
|
|
|
14
14
|
namespace "expo.modules.font"
|
|
15
15
|
defaultConfig {
|
|
16
16
|
versionCode 29
|
|
17
|
-
versionName "13.0.
|
|
17
|
+
versionName "13.0.2"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -10,6 +10,11 @@ private var fontFamilyAliases = [String: String]()
|
|
|
10
10
|
*/
|
|
11
11
|
private var hasSwizzled = false
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
Queue to protect shared resources
|
|
15
|
+
*/
|
|
16
|
+
private let queue = DispatchQueue(label: "expo.fontfamilyaliasmanager", attributes: .concurrent)
|
|
17
|
+
|
|
13
18
|
/**
|
|
14
19
|
Manages the font family aliases and swizzles the `UIFont` class.
|
|
15
20
|
*/
|
|
@@ -18,7 +23,9 @@ internal struct FontFamilyAliasManager {
|
|
|
18
23
|
Whether the given alias has already been set.
|
|
19
24
|
*/
|
|
20
25
|
internal static func hasAlias(_ familyNameAlias: String) -> Bool {
|
|
21
|
-
return
|
|
26
|
+
return queue.sync {
|
|
27
|
+
fontFamilyAliases[familyNameAlias] != nil
|
|
28
|
+
}
|
|
22
29
|
}
|
|
23
30
|
|
|
24
31
|
/**
|
|
@@ -27,14 +34,18 @@ internal struct FontFamilyAliasManager {
|
|
|
27
34
|
*/
|
|
28
35
|
internal static func setAlias(_ familyNameAlias: String, forFont font: String) {
|
|
29
36
|
maybeSwizzleUIFont()
|
|
30
|
-
|
|
37
|
+
queue.sync {
|
|
38
|
+
fontFamilyAliases[familyNameAlias] = font
|
|
39
|
+
}
|
|
31
40
|
}
|
|
32
41
|
|
|
33
42
|
/**
|
|
34
43
|
Returns the family name for the given alias or `nil` when it's not set yet.
|
|
35
44
|
*/
|
|
36
45
|
internal static func familyName(forAlias familyNameAlias: String) -> String? {
|
|
37
|
-
return
|
|
46
|
+
return queue.sync {
|
|
47
|
+
fontFamilyAliases[familyNameAlias]
|
|
48
|
+
}
|
|
38
49
|
}
|
|
39
50
|
}
|
|
40
51
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-font",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.2",
|
|
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",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"expo": "*",
|
|
45
45
|
"react": "*"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "a246df22c427d8c6c905de0915ed50f721fdf062"
|
|
48
48
|
}
|