expo: `expo-fonts` `useFonts` does not function with TTF files bundled into APKs when run on older device (Android 7.x)

Summary

As titled - it seems that expo-fonts simply can’t find assets bundled in the APK by EAS:

Screenshot_20220902-131025

Files are definitely in the APK:

image

This has been raised in the past but was closed without resolution:

https://github.com/expo/expo/issues/16263

Many icon libraries lean heavily on custom fonts and it is common for buttons, etc. to only feature an icon so this is quite critical IMO.

What platform(s) does this occur on?

Android

EAS only, does not happen in development or with classic builds - open to continuing to use classic builds if Expo hold off shutting it down.

Environment

expo-env-info 1.0.5 environment info: System: OS: macOS 12.5.1 Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.3.0 - /usr/local/bin/node npm: 8.11.0 - /usr/local/bin/npm Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8193401 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild npmPackages: expo: ~46.0.9 => 46.0.10 react: 18.0.0 => 18.0.0 react-native: 0.69.5 => 0.69.5 npmGlobalPackages: eas-cli: 2.0.0 expo-cli: 6.0.5 Expo Workflow: managed

Minimal reproducible example

Snack (note that you will need to clone this and do an EAS build to reproduce the problem): https://snack.expo.dev/@langleyfoxall/grounded-soda

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

Hmm it definitely worked pre EAS but I have a workaround so ok

Problem actually reproduces on an emulator running API 25 (Android 7.1.1) 😃