I'm having difficulty getting custom webfonts to work with react-native on android.
I have followed the instructions from here https://medium.com/@gattermeier/custom-fonts-in-react-native-for-android-b8a331a7d2a7#.w6aok6lpw but to no success.
I've tried with a few different fonts, still no joy.
nb I've tried renaming the font files, replaces dashes with underscores, all lowercase, and so on, but still no success.
Any help, greatly appreciated. This is my code:
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
} from 'react-native';
class MyBeltingApp extends Component {
render() {
return (
<View>
<Text style={styles.welcome}>
Straigtline
</Text>
</View>
);
}
}
const styles = StyleSheet.create({
welcome: {
fontFamily: 'GT-Walsheim-Bold',
fontSize: 20,
textAlign: 'center',
margin: 10,
},
});
AppRegistry.registerComponent('MyBeltingApp', () => MyBeltingApp);