expo-google-fonts-mona-sans
v0.3.0
Published
Use the Mona Sans font family from Google Fonts in your Expo app
Readme
expo-google-fonts-mona-sans
This package lets you use the Mona Sans font family from Google Fonts in your Expo app.
Mona Sans

This font family contains 16 styles.
MonaSans_200ExtraLightMonaSans_300LightMonaSans_400RegularMonaSans_500MediumMonaSans_600SemiBoldMonaSans_700BoldMonaSans_800ExtraBoldMonaSans_900BlackMonaSans_200ExtraLight_ItalicMonaSans_300Light_ItalicMonaSans_400Regular_ItalicMonaSans_500Medium_ItalicMonaSans_600SemiBold_ItalicMonaSans_700Bold_ItalicMonaSans_800ExtraBold_ItalicMonaSans_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
expo install expo-google-fonts-mona-sans expo-fontNow add code like this to your project
import React from 'react';
import {
Text,
View,
} from 'react-native';
import { useFonts } from 'expo-google-fonts-mona-sans/useFonts';
import { MonaSans_200ExtraLight } from 'expo-google-fonts-mona-sans/200ExtraLight';
import { MonaSans_300Light } from 'expo-google-fonts-mona-sans/300Light';
import { MonaSans_400Regular } from 'expo-google-fonts-mona-sans/400Regular';
import { MonaSans_500Medium } from 'expo-google-fonts-mona-sans/500Medium';
import { MonaSans_600SemiBold } from 'expo-google-fonts-mona-sans/600SemiBold';
import { MonaSans_700Bold } from 'expo-google-fonts-mona-sans/700Bold';
import { MonaSans_800ExtraBold } from 'expo-google-fonts-mona-sans/800ExtraBold';
import { MonaSans_900Black } from 'expo-google-fonts-mona-sans/900Black';
import { MonaSans_200ExtraLight_Italic } from 'expo-google-fonts-mona-sans/200ExtraLight_Italic';
import { MonaSans_300Light_Italic } from 'expo-google-fonts-mona-sans/300Light_Italic';
import { MonaSans_400Regular_Italic } from 'expo-google-fonts-mona-sans/400Regular_Italic';
import { MonaSans_500Medium_Italic } from 'expo-google-fonts-mona-sans/500Medium_Italic';
import { MonaSans_600SemiBold_Italic } from 'expo-google-fonts-mona-sans/600SemiBold_Italic';
import { MonaSans_700Bold_Italic } from 'expo-google-fonts-mona-sans/700Bold_Italic';
import { MonaSans_800ExtraBold_Italic } from 'expo-google-fonts-mona-sans/800ExtraBold_Italic';
import { MonaSans_900Black_Italic } from 'expo-google-fonts-mona-sans/900Black_Italic';
export default () => {
let [fontsLoaded] = useFonts({
MonaSans_200ExtraLight,
MonaSans_300Light,
MonaSans_400Regular,
MonaSans_500Medium,
MonaSans_600SemiBold,
MonaSans_700Bold,
MonaSans_800ExtraBold,
MonaSans_900Black,
MonaSans_200ExtraLight_Italic,
MonaSans_300Light_Italic,
MonaSans_400Regular_Italic,
MonaSans_500Medium_Italic,
MonaSans_600SemiBold_Italic,
MonaSans_700Bold_Italic,
MonaSans_800ExtraBold_Italic,
MonaSans_900Black_Italic,
});
let fontSize = 24;
let paddingVertical = 6;
if (!fontsLoaded) {
return undefined;
} 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:
'MonaSans_200ExtraLight',
}}>
Mona Sans Extra Light
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_300Light',
}}>
Mona Sans Light
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_400Regular',
}}>
Mona Sans Regular
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_500Medium',
}}>
Mona Sans Medium
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_600SemiBold',
}}>
Mona Sans Semi Bold
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_700Bold',
}}>
Mona Sans Bold
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_800ExtraBold',
}}>
Mona Sans Extra Bold
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_900Black',
}}>
Mona Sans Black
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_200ExtraLight_Italic',
}}>
Mona Sans Extra Light Italic
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_300Light_Italic',
}}>
Mona Sans Light Italic
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_400Regular_Italic',
}}>
Mona Sans Italic
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_500Medium_Italic',
}}>
Mona Sans Medium Italic
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_600SemiBold_Italic',
}}>
Mona Sans Semi Bold Italic
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_700Bold_Italic',
}}>
Mona Sans Bold Italic
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_800ExtraBold_Italic',
}}>
Mona Sans Extra Bold Italic
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily:
'MonaSans_900Black_Italic',
}}>
Mona Sans Black Italic
</Text>
</View>
);
}
};
🔡 Gallery
||||
|-|-|-|
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
||||
👩💻 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-mona-sans 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 Mona Sans 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
- Mona Sans on Google Fonts
- Google Fonts
- This package on npm
- This package on GitHub
- The Expo Google Fonts project on GitHub
expo-google-fonts-devDevlopment Package
🤝 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.
