-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding font assets to RN .60.3 #25708
Comments
I just succeeded to add custom fonts to my own project with React Native version 0.60.3, and my
This is what my file tree looks like:
Running
It looks like you took inspiration from the Libraries section from the documentation of For an app, you don't need to scope your configuration under So replace your config with
and you should be good to go! (I believe you can also drop the Hope that helps! |
Thank you. I have replaced my
as per your suggestion and font linking is now working. |
Hey, I happen to be facing the exacly same issue. I was using rnpm on package.json to link the fonts' path but when I tried |
same here, although I declared the moule to use ONLY my custom extensions metro.config.js is clearly ignored.
and the message is still the same:
Its starting to make making crazy... |
@simonwalker-celadin Problem is assets are getting coppied to wrong path. if you copy manually to android/app/src/main/assets things works |
I appear to be unable to link font assets. Hopefully I have added the fonts correctly and configured the correct settings. When I run react-native link nothing appears to happen, no messages or errors are displayed.
React Native version:
System:
OS: macOS 10.14.5
CPU: (12) x64 Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz
Memory: 8.61 GB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.0 - /usr/local/bin/node
Yarn: 1.6.0 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.1, 25.0.2, 25.0.3, 26.0.2, 26.0.3, 27.0.2, 27.0.3, 28.0.1, 28.0.2, 28.0.3
System Images: android-24 | Google Play Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.3 => 0.60.3
npmGlobalPackages:
create-react-native-app: 1.0.0
create-react-native-typescript-app: 1.2.0
react-native-git-upgrade: 0.2.7
Steps To Reproduce
My react-native.config.js:
module.exports = {
dependency: {
platforms: {
ios: {},
android: {},
},
assets: ['./assets/fonts/'],
},
};
The text was updated successfully, but these errors were encountered: