0.4.1 • Published 7 months ago

@expo-google-fonts/rokkitt v0.4.1

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

@expo-google-fonts/rokkitt

npm version license publish size publish size

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

Rokkitt

Rokkitt

This font family contains 18 styles.

  • Rokkitt_100Thin
  • Rokkitt_200ExtraLight
  • Rokkitt_300Light
  • Rokkitt_400Regular
  • Rokkitt_500Medium
  • Rokkitt_600SemiBold
  • Rokkitt_700Bold
  • Rokkitt_800ExtraBold
  • Rokkitt_900Black
  • Rokkitt_100Thin_Italic
  • Rokkitt_200ExtraLight_Italic
  • Rokkitt_300Light_Italic
  • Rokkitt_400Regular_Italic
  • Rokkitt_500Medium_Italic
  • Rokkitt_600SemiBold_Italic
  • Rokkitt_700Bold_Italic
  • Rokkitt_800ExtraBold_Italic
  • Rokkitt_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/rokkitt expo-font

Now add code like this to your project

import { Text, View } from "react-native";
import { useFonts } from '@expo-google-fonts/rokkitt/useFonts';
import { Rokkitt_100Thin } from '@expo-google-fonts/rokkitt/100Thin';
import { Rokkitt_200ExtraLight } from '@expo-google-fonts/rokkitt/200ExtraLight';
import { Rokkitt_300Light } from '@expo-google-fonts/rokkitt/300Light';
import { Rokkitt_400Regular } from '@expo-google-fonts/rokkitt/400Regular';
import { Rokkitt_500Medium } from '@expo-google-fonts/rokkitt/500Medium';
import { Rokkitt_600SemiBold } from '@expo-google-fonts/rokkitt/600SemiBold';
import { Rokkitt_700Bold } from '@expo-google-fonts/rokkitt/700Bold';
import { Rokkitt_800ExtraBold } from '@expo-google-fonts/rokkitt/800ExtraBold';
import { Rokkitt_900Black } from '@expo-google-fonts/rokkitt/900Black';
import { Rokkitt_100Thin_Italic } from '@expo-google-fonts/rokkitt/100Thin_Italic';
import { Rokkitt_200ExtraLight_Italic } from '@expo-google-fonts/rokkitt/200ExtraLight_Italic';
import { Rokkitt_300Light_Italic } from '@expo-google-fonts/rokkitt/300Light_Italic';
import { Rokkitt_400Regular_Italic } from '@expo-google-fonts/rokkitt/400Regular_Italic';
import { Rokkitt_500Medium_Italic } from '@expo-google-fonts/rokkitt/500Medium_Italic';
import { Rokkitt_600SemiBold_Italic } from '@expo-google-fonts/rokkitt/600SemiBold_Italic';
import { Rokkitt_700Bold_Italic } from '@expo-google-fonts/rokkitt/700Bold_Italic';
import { Rokkitt_800ExtraBold_Italic } from '@expo-google-fonts/rokkitt/800ExtraBold_Italic';
import { Rokkitt_900Black_Italic } from '@expo-google-fonts/rokkitt/900Black_Italic';

export default () => {

  let [fontsLoaded] = useFonts({
    Rokkitt_100Thin, 
    Rokkitt_200ExtraLight, 
    Rokkitt_300Light, 
    Rokkitt_400Regular, 
    Rokkitt_500Medium, 
    Rokkitt_600SemiBold, 
    Rokkitt_700Bold, 
    Rokkitt_800ExtraBold, 
    Rokkitt_900Black, 
    Rokkitt_100Thin_Italic, 
    Rokkitt_200ExtraLight_Italic, 
    Rokkitt_300Light_Italic, 
    Rokkitt_400Regular_Italic, 
    Rokkitt_500Medium_Italic, 
    Rokkitt_600SemiBold_Italic, 
    Rokkitt_700Bold_Italic, 
    Rokkitt_800ExtraBold_Italic, 
    Rokkitt_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: "Rokkitt_100Thin"
        }}>
          Rokkitt Thin
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_200ExtraLight"
        }}>
          Rokkitt Extra Light
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_300Light"
        }}>
          Rokkitt Light
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_400Regular"
        }}>
          Rokkitt Regular
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_500Medium"
        }}>
          Rokkitt Medium
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_600SemiBold"
        }}>
          Rokkitt Semi Bold
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_700Bold"
        }}>
          Rokkitt Bold
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_800ExtraBold"
        }}>
          Rokkitt Extra Bold
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_900Black"
        }}>
          Rokkitt Black
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_100Thin_Italic"
        }}>
          Rokkitt Thin Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_200ExtraLight_Italic"
        }}>
          Rokkitt Extra Light Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_300Light_Italic"
        }}>
          Rokkitt Light Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_400Regular_Italic"
        }}>
          Rokkitt Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_500Medium_Italic"
        }}>
          Rokkitt Medium Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_600SemiBold_Italic"
        }}>
          Rokkitt Semi Bold Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_700Bold_Italic"
        }}>
          Rokkitt Bold Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_800ExtraBold_Italic"
        }}>
          Rokkitt Extra Bold Italic
        </Text>
        <Text style={{
          fontSize,
          paddingVertical,
          // Note the quoting of the value for `fontFamily` here; it expects a string!
          fontFamily: "Rokkitt_900Black_Italic"
        }}>
          Rokkitt Black Italic
        </Text>
      </View>
    );
  }
};

🔡 Gallery

Rokkitt_100ThinRokkitt_200ExtraLightRokkitt_300Light
Rokkitt_400RegularRokkitt_500MediumRokkitt_600SemiBold
Rokkitt_700BoldRokkitt_800ExtraBoldRokkitt_900Black
Rokkitt_100Thin_ItalicRokkitt_200ExtraLight_ItalicRokkitt_300Light_Italic
Rokkitt_400Regular_ItalicRokkitt_500Medium_ItalicRokkitt_600SemiBold_Italic
Rokkitt_700Bold_ItalicRokkitt_800ExtraBold_ItalicRokkitt_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/rokkitt 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 Rokkitt 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.1

7 months ago

0.4.0

7 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