Description
On Android, when fontFamily doesn't match any font, ReactFontManager falls back to the system font without logging anything. iOS logs Unrecognized font family '<name>' in the same case (RCTFont.mm), so a missing or misnamed font is easy to spot on iOS but not on Android.
Steps to reproduce
- Set
fontFamily: 'FontFamilyThatDoesNotExist' on a <Text> (see reproducer)
- Run on Android and watch logcat
- Text renders in the system font and nothing is logged
React Native Version
0.87.1
Affected Platforms
Runtime - Android
Output of npx @react-native-community/cli info
Not environment specific: `createAssetTypeface` in ReactFontManager.kt has no log before the system font fallback (main and 0.87-stable).
Stacktrace or Logs
Android: nothing is logged.
iOS: Unrecognized font family 'FontFamilyThatDoesNotExist'
MANDATORY Reproducer
https://github.com/mosab-nasrallah/react-native/blob/repro-android-unknown-font-family/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js
Screenshots and Videos
No response
Description
On Android, when
fontFamilydoesn't match any font,ReactFontManagerfalls back to the system font without logging anything. iOS logsUnrecognized font family '<name>'in the same case (RCTFont.mm), so a missing or misnamed font is easy to spot on iOS but not on Android.Steps to reproduce
fontFamily: 'FontFamilyThatDoesNotExist'on a<Text>(see reproducer)React Native Version
0.87.1
Affected Platforms
Runtime - Android
Output of
npx @react-native-community/cli infoStacktrace or Logs
MANDATORY Reproducer
https://github.com/mosab-nasrallah/react-native/blob/repro-android-unknown-font-family/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js
Screenshots and Videos
No response