我想在iOS上的React Native App上添加自定义字体系列。我对Android没有问题,但我在iOS中出错了:
无法识别的字体系列'dinproRegular'
我使用this link来设置我的字体,但没有结果。
文件名:dinproRegular.ttf
打电话给本土:fontFamily: "dinproRegular" // Test with "Dinpro Regular" too
没有结果 :(
有人有想法吗?
只需检查Ios或Android中当前安装的字体:
https://github.com/react-native-training/react-native-fonts
如果要添加自定义字体:
https://medium.com/@danielskripnik/how-to-add-and-remove-custom-fonts-in-react-native-b2830084b0e4
希望能帮助到你!