我能够修改原生输入标签的字体系列,如下所示:
<Input style={{fontFamily: 'Termina-Bold'}}/>但我找不到如何修改用户输入的文本的字体系列。
我怎样才能做到这一点?
发布于 2021-01-13 09:49:22
其工作情况:-)
无fontFamily
<Input placeholder="Underline Textbox" style={{ textAlign: "center", marginTop: 15,backgroundColor:'pink' }} />示例:


波平斯-半
<Input placeholder="Underline Textbox" style={{ fontFamily: "Poppins-SemiBold", textAlign: "center", marginTop: 15,backgroundColor:'pink' }} />


波平斯-正规
<Input placeholder="Underline Textbox" style={{ fontFamily: "Poppins-Regular", textAlign: "center", marginTop: 15,backgroundColor:'pink' }} />

发布于 2021-01-12 12:32:40
链接添加这样的字体
在根文件夹上创建react-native.config.js文件,并添加以下内容
module.exports = {
project: {
ios: {},
android: {}, // grouped into "project"
},
assets: ["./src/assets/fonts/"], // src/assets/fonts/ replace with your fonts location folder path
};



https://stackoverflow.com/questions/65569978
复制相似问题