2

Trying to integrate custom fonts 'Tajawal-Bold' and 'Tajawal-Medium' with my RN project that use react-native-paper. (Android app only) I did like described in the documentation of react-native=paper, https://callstack.github.io/react-native-paper/fonts.html.

This fonts are applied to RN components, but paper component doesn't.

Anyone can help?

Aymen
  • 248
  • 3
  • 15
  • Make sure your font files are .ttf files. Once done, restart your project to refresh changes. If still not working share screenshots of fonts folder and command you fired on cmd with message – Nikhil Parmar Sep 22 '20 at 11:18
  • @NikhilParmar i did what say without success, and my files (.ttf) are in forlder named assets/fonts. and this is the content of react-native.config.js module.exports = { project: { ios: {}, android: {}, }, assets: ["./assets/fonts"], }; – Aymen Sep 22 '20 at 11:24
  • Try to create a snack (https://snack.expo.io/) and share it here. – Nikhil Parmar Sep 22 '20 at 11:53
  • Also, make sure you have applied changes in this file. https://github.com/callstack/react-native-paper/blob/master/src/styles/fonts.tsx – Nikhil Parmar Sep 22 '20 at 12:08
  • Did you run "react-native link"? – raxerz Sep 22 '20 at 19:04
  • @raxerz, yes sure, the custom font is applied to RN elements like 'Text', but paper elements no – Aymen Sep 23 '20 at 07:09
  • Have you tried it? – raxerz Sep 23 '20 at 07:10

1 Answers1

0

i fixied this problem by eliminate using configureFonts function

Aymen
  • 248
  • 3
  • 15