When I apply fonts in my Expo app it shows on web but doesn't applies on android or IOS

Viewed 171

enter image description here

This Is MY Emulator and my fonts doesn't show here

MY Code is

import { StyleSheet, View , Text } from 'react-native';
import Main from './src/Components/MainInput';
import React, { useState } from 'react';
import { Scheme } from './src/Utils/ColorScheme';
import { Spacing } from './src/Utils/Spacing';
import GettingTime from './src/Components/GettingTime';
import { DancingScript_400Regular , useFonts } from '@expo-google-fonts/dancing-script';


export default function App() {
    const [ data, addData ] = useState(null);
    let [ fontsLoaded ] = useFonts({
       DancingScript_400Regular,
      });
   
      if (!fontsLoaded) {
        return null;
      }
      
    return (
        <View style={styles.container}>
            {data ? <GettingTime 
            
             givenData={data}
              addData={addData}
               /> : <Main adddata={addData}/>}
               <View style={styles.copy}>
                <Text style={styles.copyText}>This App is Created by &copy; Hayder Ali. All &copy; Copyrights and &trade; Trademarks are reserved</Text>
               </View>
        </View>
    );
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: Scheme.background,
        alignItems: 'center',
        paddingTop: Spacing.xxxxl
    },
    copy:{
        padding:Spacing.md,
        
        
    },
    copyText:{
        color:Scheme.Figures,
        textAlign:"justify",
     fontFamily:"normal"
    }
});

Can Anyone tell me what am I doing wrong

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

2 Answers
Step 1. Create assets Folder
Step 2. Create Fonts Folder
Step 3. Paste file in Fonts folder
Step 4. Add Fonts in Fonts folder
Step 5. Create react-native.config.js file
Step 6. Add this code in react-native.config.js file
module.exports = {
  assets: ['./src/assets/Fonts'],
};
Step 7. Run npx react-native link command

For one I had to delete a fontWeight: 'bold' declaration I had made because that's actually not allowed. Secondly I had to restart my expo server. I tried adding the 'bold' declaration back afterward to test it and it indeed broke it again.

Related