【发布时间】:2018-07-16 03:01:49
【问题描述】:
我根据博览会网站加载了 open-sans-regular 字体:
async componentDidMount() {
await Font.loadAsync({
'open-sans-regular': require('assets/fonts/OpenSans-Regular.ttf')
})
this.setState({ fontLoaded: true })
}
当我在文本上应用以下样式时,它适用于 Android 设备,但不适用于 iOS 设备。我是否遗漏了什么或者我需要加载“open-sans-bold”并使用 fontFamily 属性?
<Text style={{ fontWeight: 'bold' }}>Testing</Text>
【问题讨论】:
标签: ios reactjs react-native expo