0.4.0 • Published 7 months ago

@expo-google-fonts/noto-serif v0.4.0

Weekly downloads
79
License
MIT AND OFL-1.1
Repository
github
Last release
7 months ago

@expo-google-fonts/noto-serif

npm version license publish size publish size

This package lets you use the Noto Serif font family from Google Fonts in your Expo app.

Noto Serif

Noto Serif

This font family contains 18 styles.

  • NotoSerif_100Thin
  • NotoSerif_200ExtraLight
  • NotoSerif_300Light
  • NotoSerif_400Regular
  • NotoSerif_500Medium
  • NotoSerif_600SemiBold
  • NotoSerif_700Bold
  • NotoSerif_800ExtraBold
  • NotoSerif_900Black
  • NotoSerif_100Thin_Italic
  • NotoSerif_200ExtraLight_Italic
  • NotoSerif_300Light_Italic
  • NotoSerif_400Regular_Italic
  • NotoSerif_500Medium_Italic
  • NotoSerif_600SemiBold_Italic
  • NotoSerif_700Bold_Italic
  • NotoSerif_800ExtraBold_Italic
  • NotoSerif_900Black_Italic

Usage

Run this command from the shell in the root directory of your Expo project to add the font family package to your project

npx expo install @expo-google-fonts/noto-serif expo-font

Now add code like this to your project

import { Text, View } from "react-native";
import { useFonts } from '@expo-google-fonts/noto-serif/useFonts';
import { NotoSerif_100Thin } from '@expo-google-fonts/noto-serif/100Thin';
import { NotoSerif_200ExtraLight } from '@expo-google-fonts/noto-serif/200ExtraLight';
import { NotoSerif_300Light } from '@expo-google-fonts/noto-serif/300Light';
import { NotoSerif_400Regular } from '@expo-google-fonts/noto-serif/400Regular';
import { NotoSerif_500Medium } from '@expo-google-fonts/noto-serif/500Medium';
import { NotoSerif_600SemiBold } from '@expo-google-fonts/noto-serif/600SemiBold';
import { NotoSerif_700Bold } from '@expo-google-fonts/noto-serif/700Bold';
import { NotoSerif_800ExtraBold } from '@expo-google-fonts/noto-serif/800ExtraBold';
import { NotoSerif_900Black } from '@expo-google-fonts/noto-serif/900Black';
import { NotoSerif_100Thin_Italic } from '@expo-google-fonts/noto-serif/100Thin_Italic';
import { NotoSerif_200ExtraLight_Italic } from '@expo-google-fonts/noto-serif/200ExtraLight_Italic';
import { NotoSerif_300Light_Italic } from '@expo-google-fonts/noto-serif/300Light_Italic';
import { NotoSerif_400Regular_Italic } from '@expo-google-fonts/noto-serif/400Regular_Italic';
import { NotoSerif_500Medium_Italic } from '@expo-google-fonts/noto-serif/500Medium_Italic';
import { NotoSerif_600SemiBold_Italic } from '@expo-google-fonts/noto-serif/600SemiBold_Italic';
import { NotoSerif_700Bold_Italic } from '@expo-google-fonts/noto-serif/700Bold_Italic';
import { NotoSerif_800ExtraBold_Italic } from '@expo-google-fonts/noto-serif/800ExtraBold_Italic';
import { NotoSerif_900Black_Italic } from '@expo-google-fonts/noto-serif/900Black_Italic';

export default () => {

  let [fontsLoaded] = useFonts({
    NotoSerif_100Thin, 
    NotoSerif_200ExtraLight, 
    NotoSerif_300Light, 
    NotoSerif_400Regular, 
    NotoSerif_500Medium, 
    NotoSerif_600SemiBold, 
    NotoSerif_700Bold, 
    NotoSerif_800ExtraBold, 
    NotoSerif_900Black, 
    NotoSerif_100Thin_Italic, 
    NotoSerif_200ExtraLight_Italic, 
    NotoSerif_300Light_Italic, 
    NotoSerif_400Regular_Italic, 
    NotoSerif_500Medium_Italic, 
    NotoSerif_600SemiBold_Italic, 
    NotoSerif_700Bold_Italic, 
    NotoSerif_800ExtraBold_Italic, 
    NotoSerif_900Black_Italic
  });

  let fontSize = 24;
  let paddingVertical = 6;

  if (!fontsLoaded) {
    return null;
  } else {
    return (
      <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_100Thin"
        }}>
          Noto Serif Thin
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_200ExtraLight"
        }}>
          Noto Serif Extra Light
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_300Light"
        }}>
          Noto Serif Light
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_400Regular"
        }}>
          Noto Serif Regular
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_500Medium"
        }}>
          Noto Serif Medium
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_600SemiBold"
        }}>
          Noto Serif Semi Bold
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_700Bold"
        }}>
          Noto Serif Bold
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_800ExtraBold"
        }}>
          Noto Serif Extra Bold
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_900Black"
        }}>
          Noto Serif Black
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_100Thin_Italic"
        }}>
          Noto Serif Thin Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_200ExtraLight_Italic"
        }}>
          Noto Serif Extra Light Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_300Light_Italic"
        }}>
          Noto Serif Light Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_400Regular_Italic"
        }}>
          Noto Serif Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_500Medium_Italic"
        }}>
          Noto Serif Medium Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_600SemiBold_Italic"
        }}>
          Noto Serif Semi Bold Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_700Bold_Italic"
        }}>
          Noto Serif Bold Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_800ExtraBold_Italic"
        }}>
          Noto Serif Extra Bold Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "NotoSerif_900Black_Italic"
        }}>
          Noto Serif Black Italic
        </Text>
      </View>
    );
  }
};

🔡 Gallery

NotoSerif_100ThinNotoSerif_200ExtraLightNotoSerif_300Light
NotoSerif_400RegularNotoSerif_500MediumNotoSerif_600SemiBold
NotoSerif_700BoldNotoSerif_800ExtraBoldNotoSerif_900Black
NotoSerif_100Thin_ItalicNotoSerif_200ExtraLight_ItalicNotoSerif_300Light_Italic
NotoSerif_400Regular_ItalicNotoSerif_500Medium_ItalicNotoSerif_600SemiBold_Italic
NotoSerif_700Bold_ItalicNotoSerif_800ExtraBold_ItalicNotoSerif_900Black_Italic

👩‍💻 Use During Development

If you are trying out lots of different fonts, you can try using the @expo-google-fonts/dev package.

You can import any font style from any Expo Google Fonts package from it. It will load the fonts over the network at runtime instead of adding the asset as a file to your project, so it may take longer for your app to get to interactivity at startup, but it is extremely convenient for playing around with any style that you want.

📖 License

The @expo-google-fonts/noto-serif package and its code are released under the MIT license.

All the fonts in the Google Fonts catalog are free and open source.

Check the Noto Serif page on Google Fonts for the specific license of this font family.

You can use these fonts freely in your products & projects - print or digital, commercial or otherwise. However, you can't sell the fonts on their own. This isn't legal advice, please consider consulting a lawyer and see the full license for all details.

🔗 Links

🤝 Contributing

Contributions are very welcome! This entire directory, including what you are reading now, was generated from code. Instead of submitting PRs to this directly, please make contributions to the generator instead.

0.3.0

9 months ago

0.4.0

7 months ago

0.3.1

8 months ago

0.2.3

3 years ago

0.2.2

4 years ago

0.2.0

5 years ago

0.1.0

6 years ago

0.0.2

6 years ago