File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
expo-font/android/src/main/java/expo/modules/font Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 14
14
15
15
### 💡 Others
16
16
17
+ - [ android] throw when loading empty font file ([ #38229 ] ( https://github.com/expo/expo/pull/38229 ) by [ @vonovak ] ( https://github.com/vonovak ) )
18
+
17
19
## 11.1.7 - 2025-07-03
18
20
19
21
_ This version does not introduce any user-facing changes._
Original file line number Diff line number Diff line change @@ -44,6 +44,12 @@ open class FontLoaderModule : Module() {
44
44
val file = Uri .parse(localUri).path?.let { File (it) }
45
45
? : throw FileNotFoundException (localUri)
46
46
47
+ if (file.length() == 0L ) {
48
+ throw CodedException (
49
+ " Font file for $fontFamilyName is empty. Make sure the local file path is correctly populated."
50
+ )
51
+ }
52
+
47
53
Typeface .createFromFile(file)
48
54
}
49
55
You can’t perform that action at this time.
0 commit comments