title: Why isn't my custom fonts loaded onto React Native?
body: <p>I am trying to use a custom font for my project. I have all variations of 'Roboto' saved into my assets folder.</p>
  <p>My react-native config</p>
  <pre><code>module.exports = {
      project: {
          ios: {},
          android: {}
      },
      assets: [&quot;./assets/fonts/&quot;]
  };
  </code></pre>
  <p>My Theme page which exports the custom fonts</p>
  <pre><code>import { Dimensions } from &quot;react-native&quot;;
  const { width, height } = Dimensions.get(&quot;window&quot;);
  
  export const FONTS = {
  largeTitle: { fontFamily: &quot;Roboto-regular&quot;, fontSize: SIZES.largeTitle, lineHeight: 55 },
  h1: { fontFamily: &quot;Roboto-Black&quot;, fontSize: SIZES.h1, lineHeight: 36 },
  h2: { fontFamily: &quot;Roboto-Bold&quot;, fontSize: SIZES.h2, lineHeight: 30 },
  }
  
  const appTheme = { COLORS, SIZES, FONTS };
  
  export default appTheme;
  </code></pre>
  <p>And on my Home Page I am trying to use the font.</p>
  <pre><code>import React from &quot;react&quot;
  import { SafeAreaView, StyleSheet, View, Text, TouchableOpacity, Image, FlatList } from &quot;react- 
  native&quot;
  import { COLORS, SIZES, icons, images, FONTS } from '../constants'
  
  function renderMainCategories(){
      return (
  
      &lt;View style={{ padding:SIZES.padding * 2 }}&gt;
          &lt;Text style={{ ...FONTS.h1 }}&gt;Main&lt;/Text&gt;
          &lt;Text style={{ ...FONTS.h1 }}&gt;Categories&lt;/Text&gt;
      &lt;/View&gt;
  
  )}
  </code></pre>
  <p>As you can see in the style={{ ...FONTS.h1 }} I feel like I've done everything right but for some reason it gives me an error while trying to use the font.</p>
  <p>It gives me this error ---</p>
  <p>fontFamily &quot;Roboto-Black&quot; is not a system font and has not been loaded through Font.loadAsync.</p>
  <p>I've tried to find Font.loadAsync and also tried to add it to the parent component but it doesn't work! And I've tried npx react-native link! I'd really appreciate someone advice and not just a link to a page thanks!</p>
  <p>Any tips?</p>