This is my react-native.config.js file:
module.exports = {
project: {
ios: {},
android: {}, // grouped into "project"
},
assets: ['./assets/fonts/'], // stays the same
};
I added some fonts to my assets/fonts folder and ran react-native link. after this I tested my application on IOs emulator and fonts have worked fine but on android it is not working.
Here is the whole component:
import React from 'react';
import {SafeAreaView, StyleSheet, Text} from 'react-native';
const styles = StyleSheet.create({
textContainer: {
marginTop: '30%',
alignSelf: 'center',
},
text: {
fontFamily: 'BodoniSvtyTwoITCTTBook',
color: 'red',
fontSize: 25,
},
});
const App = () => {
return (
<SafeAreaView style={styles.textContainer}>
<Text style={styles.text}>
Welcome to Font-Play in react-native for android
</Text>
</SafeAreaView>
);
};
export default App;
Location of the assets in android folder:
Any suggestions please?
