Skip to content

Instantly share code, notes, and snippets.

@cyberstackover
Created July 23, 2018 22:27
Show Gist options
  • Save cyberstackover/ea7faeb88aa7968a6325a2b44e2f28ac to your computer and use it in GitHub Desktop.
Save cyberstackover/ea7faeb88aa7968a6325a2b44e2f28ac to your computer and use it in GitHub Desktop.
include font BebasNeue React Native
Apps.js
import { Font } from 'expo';
Font.loadAsync({
'BebasNeue': require('./fonts/BebasNeue.ttf'),
});
/////////////////////////////////////////////////////////////////////
const FontLoader = NativeModules.FontLoader;
class SplashScreen extends React.Component {
componentDidMount() {
FontLoader &&
FontLoader.loadFont("BebasNeue", "../src/fonts/BebasNeue.ttf");
setTimeout(() => {
this.props.navigation.push("Home");
}, 1500);
console.log(Platform.OS);
}
/////////////////////////////////////////////////////////////////////
cardText: {
fontFamily: "BebasNeue",
fontSize: 30
},
<Text
style={{
fontFamily: "BebasNeue",
fontSize: 18,
color: "#282a2c"
}}
>
/////////////////////////////////////////////////////////////////////
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment